代码初始化

main
剑古敛锋 2024-02-07 02:46:46 +08:00
parent ed6464ff09
commit 6806dab538
88 changed files with 264273 additions and 390 deletions

448
.gitignore vendored
View File

@ -1,400 +1,68 @@
# ---> VisualStudio
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# Prerequisites
*.d
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
# Compiled Object files
*.slo
*.lo
*.o
*.obj
*.iobj
# Precompiled Headers
*.gch
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Fortran module files
*.mod
*.smod
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Visual Studio Trace Files
*.e2e
# Executables
*.exe
*.out
*.app
*.tiff
*.tif
*.log
*.ipch
*.db
*.pdb
*.tlog
*.log
*.pdb
*.db
*.rar
*.zip
*.7z
*.vsidx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
Browse.VC.db
Browse.VC.db-shm
Browse.VC.db-wal
fileList.bin
HierarchyCache.v1.txt
Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal
# ignort Folder
/MGC
/LAMP
/tmp
/dist
dist/
build/
/build
.vs/
CPluseCpluse/WBCLFZProgram/WBCLFZProgram/.vs/
/TestData

Binary file not shown.

View File

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpolsarpro50", "testpolsarpro50\testpolsarpro50.vcxproj", "{3112FCA4-990C-4DB8-9C53-A568C968EA7F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Debug|Win32.ActiveCfg = Debug|Win32
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Debug|Win32.Build.0 = Debug|Win32
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Debug|x64.ActiveCfg = Debug|x64
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Debug|x64.Build.0 = Debug|x64
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Release|Win32.ActiveCfg = Release|Win32
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Release|Win32.Build.0 = Release|Win32
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Release|x64.ActiveCfg = Release|x64
{3112FCA4-990C-4DB8-9C53-A568C968EA7F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@ -0,0 +1,68 @@
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
*.opendb
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.tiff
*.tif
*.log
*.ipch
*.db
*.pdb
*.tlog
*.log
*.pdb
*.db
*.rar
*.zip
*.7z
*.vsidx
Browse.VC.db
Browse.VC.db-shm
Browse.VC.db-wal
fileList.bin
HierarchyCache.v1.txt
Solution.VC.db
Solution.VC.db-shm
Solution.VC.db-wal
# ignort Folder
/MGC
/LAMP
/tmp
/dist
dist/
build/
/build
.vs/
CPluseCpluse/WBCLFZProgram/WBCLFZProgram/.vs/
/TestData

View File

@ -0,0 +1,61 @@
/***********************************************************************
PolSARpro v4.0 is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 (1991) of the License, or any
later version. This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details.
************************************************************************
File : PolSARproLib.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER
Version : 1.0
Creation : 08/2010
Update :
*-----------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Image and Remote Sensing Group
SAPHIR Team (SAr Polarimetry Holography Interferometry Radargrammetry)
UNIVERSITY OF RENNES I
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail:eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-----------------------------------------------------------------------
Description : PolSARpro Routines
*-----------------------------------------------------------------------
***********************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
/* ROUTINES DECLARATION */
#include "util.h"
#include "util_block.h"
#include "util_convert.h"
#include "graphics.h"
#include "matrix.h"
#include "processing.h"
#include "statistics.h"
#include "sub_aperture.h"
#include "my_utils.h"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,267 @@
/*************************************************************************
Copyright (c) Sergey Bochkanov (ALGLIB project).
>>> SOURCE LICENSE >>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (www.fsf.org); either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is available at
http://www.fsf.org/licensing/licenses
>>> END OF LICENSE >>>
*************************************************************************/
#ifndef _diffequations_pkg_h
#define _diffequations_pkg_h
#include "ap.h"
#include "alglibinternal.h"
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
typedef struct
{
ae_int_t n;
ae_int_t m;
double xscale;
double h;
double eps;
ae_bool fraceps;
ae_vector yc;
ae_vector escale;
ae_vector xg;
ae_int_t solvertype;
ae_bool needdy;
double x;
ae_vector y;
ae_vector dy;
ae_matrix ytbl;
ae_int_t repterminationtype;
ae_int_t repnfev;
ae_vector yn;
ae_vector yns;
ae_vector rka;
ae_vector rkc;
ae_vector rkcs;
ae_matrix rkb;
ae_matrix rkk;
rcommstate rstate;
} odesolverstate;
typedef struct
{
ae_int_t nfev;
ae_int_t terminationtype;
} odesolverreport;
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS C++ INTERFACE
//
/////////////////////////////////////////////////////////////////////////
namespace alglib
{
/*************************************************************************
*************************************************************************/
class _odesolverstate_owner
{
public:
_odesolverstate_owner();
_odesolverstate_owner(const _odesolverstate_owner &rhs);
_odesolverstate_owner& operator=(const _odesolverstate_owner &rhs);
virtual ~_odesolverstate_owner();
alglib_impl::odesolverstate* c_ptr();
alglib_impl::odesolverstate* c_ptr() const;
protected:
alglib_impl::odesolverstate *p_struct;
};
class odesolverstate : public _odesolverstate_owner
{
public:
odesolverstate();
odesolverstate(const odesolverstate &rhs);
odesolverstate& operator=(const odesolverstate &rhs);
virtual ~odesolverstate();
ae_bool &needdy;
real_1d_array y;
real_1d_array dy;
double &x;
};
/*************************************************************************
*************************************************************************/
class _odesolverreport_owner
{
public:
_odesolverreport_owner();
_odesolverreport_owner(const _odesolverreport_owner &rhs);
_odesolverreport_owner& operator=(const _odesolverreport_owner &rhs);
virtual ~_odesolverreport_owner();
alglib_impl::odesolverreport* c_ptr();
alglib_impl::odesolverreport* c_ptr() const;
protected:
alglib_impl::odesolverreport *p_struct;
};
class odesolverreport : public _odesolverreport_owner
{
public:
odesolverreport();
odesolverreport(const odesolverreport &rhs);
odesolverreport& operator=(const odesolverreport &rhs);
virtual ~odesolverreport();
ae_int_t &nfev;
ae_int_t &terminationtype;
};
/*************************************************************************
Cash-Karp adaptive ODE solver.
This subroutine solves ODE Y'=f(Y,x) with initial conditions Y(xs)=Ys
(here Y may be single variable or vector of N variables).
INPUT PARAMETERS:
Y - initial conditions, array[0..N-1].
contains values of Y[] at X[0]
N - system size
X - points at which Y should be tabulated, array[0..M-1]
integrations starts at X[0], ends at X[M-1], intermediate
values at X[i] are returned too.
SHOULD BE ORDERED BY ASCENDING OR BY DESCENDING!!!!
M - number of intermediate points + first point + last point:
* M>2 means that you need both Y(X[M-1]) and M-2 values at
intermediate points
* M=2 means that you want just to integrate from X[0] to
X[1] and don't interested in intermediate values.
* M=1 means that you don't want to integrate :)
it is degenerate case, but it will be handled correctly.
* M<1 means error
Eps - tolerance (absolute/relative error on each step will be
less than Eps). When passing:
* Eps>0, it means desired ABSOLUTE error
* Eps<0, it means desired RELATIVE error. Relative errors
are calculated with respect to maximum values of Y seen
so far. Be careful to use this criterion when starting
from Y[] that are close to zero.
H - initial step lenth, it will be adjusted automatically
after the first step. If H=0, step will be selected
automatically (usualy it will be equal to 0.001 of
min(x[i]-x[j])).
OUTPUT PARAMETERS
State - structure which stores algorithm state between subsequent
calls of OdeSolverIteration. Used for reverse communication.
This structure should be passed to the OdeSolverIteration
subroutine.
SEE ALSO
AutoGKSmoothW, AutoGKSingular, AutoGKIteration, AutoGKResults.
-- ALGLIB --
Copyright 01.09.2009 by Bochkanov Sergey
*************************************************************************/
void odesolverrkck(const real_1d_array &y, const ae_int_t n, const real_1d_array &x, const ae_int_t m, const double eps, const double h, odesolverstate &state);
void odesolverrkck(const real_1d_array &y, const real_1d_array &x, const double eps, const double h, odesolverstate &state);
/*************************************************************************
This function provides reverse communication interface
Reverse communication interface is not documented or recommended to use.
See below for functions which provide better documented API
*************************************************************************/
bool odesolveriteration(const odesolverstate &state);
/*************************************************************************
This function is used to launcn iterations of ODE solver
It accepts following parameters:
diff - callback which calculates dy/dx for given y and x
ptr - optional pointer which is passed to diff; can be NULL
-- ALGLIB --
Copyright 01.09.2009 by Bochkanov Sergey
*************************************************************************/
void odesolversolve(odesolverstate &state,
void (*diff)(const real_1d_array &y, double x, real_1d_array &dy, void *ptr),
void *ptr = NULL);
/*************************************************************************
ODE solver results
Called after OdeSolverIteration returned False.
INPUT PARAMETERS:
State - algorithm state (used by OdeSolverIteration).
OUTPUT PARAMETERS:
M - number of tabulated values, M>=1
XTbl - array[0..M-1], values of X
YTbl - array[0..M-1,0..N-1], values of Y in X[i]
Rep - solver report:
* Rep.TerminationType completetion code:
* -2 X is not ordered by ascending/descending or
there are non-distinct X[], i.e. X[i]=X[i+1]
* -1 incorrect parameters were specified
* 1 task has been solved
* Rep.NFEV contains number of function calculations
-- ALGLIB --
Copyright 01.09.2009 by Bochkanov Sergey
*************************************************************************/
void odesolverresults(const odesolverstate &state, ae_int_t &m, real_1d_array &xtbl, real_2d_array &ytbl, odesolverreport &rep);
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
void odesolverrkck(/* Real */ ae_vector* y,
ae_int_t n,
/* Real */ ae_vector* x,
ae_int_t m,
double eps,
double h,
odesolverstate* state,
ae_state *_state);
ae_bool odesolveriteration(odesolverstate* state, ae_state *_state);
void odesolverresults(odesolverstate* state,
ae_int_t* m,
/* Real */ ae_vector* xtbl,
/* Real */ ae_matrix* ytbl,
odesolverreport* rep,
ae_state *_state);
ae_bool _odesolverstate_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _odesolverstate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _odesolverstate_clear(void* _p);
void _odesolverstate_destroy(void* _p);
ae_bool _odesolverreport_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _odesolverreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _odesolverreport_clear(void* _p);
void _odesolverreport_destroy(void* _p);
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,691 @@
/*************************************************************************
Copyright (c) Sergey Bochkanov (ALGLIB project).
>>> SOURCE LICENSE >>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (www.fsf.org); either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is available at
http://www.fsf.org/licensing/licenses
>>> END OF LICENSE >>>
*************************************************************************/
#ifndef _fasttransforms_pkg_h
#define _fasttransforms_pkg_h
#include "ap.h"
#include "alglibinternal.h"
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS C++ INTERFACE
//
/////////////////////////////////////////////////////////////////////////
namespace alglib
{
/*************************************************************************
1-dimensional complex FFT.
Array size N may be arbitrary number (composite or prime). Composite N's
are handled with cache-oblivious variation of a Cooley-Tukey algorithm.
Small prime-factors are transformed using hard coded codelets (similar to
FFTW codelets, but without low-level optimization), large prime-factors
are handled with Bluestein's algorithm.
Fastests transforms are for smooth N's (prime factors are 2, 3, 5 only),
most fast for powers of 2. When N have prime factors larger than these,
but orders of magnitude smaller than N, computations will be about 4 times
slower than for nearby highly composite N's. When N itself is prime, speed
will be 6 times lower.
Algorithm has O(N*logN) complexity for any N (composite or prime).
INPUT PARAMETERS
A - array[0..N-1] - complex function to be transformed
N - problem size
OUTPUT PARAMETERS
A - DFT of a input array, array[0..N-1]
A_out[j] = SUM(A_in[k]*exp(-2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
-- ALGLIB --
Copyright 29.05.2009 by Bochkanov Sergey
*************************************************************************/
void fftc1d(complex_1d_array &a, const ae_int_t n);
void fftc1d(complex_1d_array &a);
/*************************************************************************
1-dimensional complex inverse FFT.
Array size N may be arbitrary number (composite or prime). Algorithm has
O(N*logN) complexity for any N (composite or prime).
See FFTC1D() description for more information about algorithm performance.
INPUT PARAMETERS
A - array[0..N-1] - complex array to be transformed
N - problem size
OUTPUT PARAMETERS
A - inverse DFT of a input array, array[0..N-1]
A_out[j] = SUM(A_in[k]/N*exp(+2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
-- ALGLIB --
Copyright 29.05.2009 by Bochkanov Sergey
*************************************************************************/
void fftc1dinv(complex_1d_array &a, const ae_int_t n);
void fftc1dinv(complex_1d_array &a);
/*************************************************************************
1-dimensional real FFT.
Algorithm has O(N*logN) complexity for any N (composite or prime).
INPUT PARAMETERS
A - array[0..N-1] - real function to be transformed
N - problem size
OUTPUT PARAMETERS
F - DFT of a input array, array[0..N-1]
F[j] = SUM(A[k]*exp(-2*pi*sqrt(-1)*j*k/N), k = 0..N-1)
NOTE:
F[] satisfies symmetry property F[k] = conj(F[N-k]), so just one half
of array is usually needed. But for convinience subroutine returns full
complex array (with frequencies above N/2), so its result may be used by
other FFT-related subroutines.
-- ALGLIB --
Copyright 01.06.2009 by Bochkanov Sergey
*************************************************************************/
void fftr1d(const real_1d_array &a, const ae_int_t n, complex_1d_array &f);
void fftr1d(const real_1d_array &a, complex_1d_array &f);
/*************************************************************************
1-dimensional real inverse FFT.
Algorithm has O(N*logN) complexity for any N (composite or prime).
INPUT PARAMETERS
F - array[0..floor(N/2)] - frequencies from forward real FFT
N - problem size
OUTPUT PARAMETERS
A - inverse DFT of a input array, array[0..N-1]
NOTE:
F[] should satisfy symmetry property F[k] = conj(F[N-k]), so just one
half of frequencies array is needed - elements from 0 to floor(N/2). F[0]
is ALWAYS real. If N is even F[floor(N/2)] is real too. If N is odd, then
F[floor(N/2)] has no special properties.
Relying on properties noted above, FFTR1DInv subroutine uses only elements
from 0th to floor(N/2)-th. It ignores imaginary part of F[0], and in case
N is even it ignores imaginary part of F[floor(N/2)] too.
When you call this function using full arguments list - "FFTR1DInv(F,N,A)"
- you can pass either either frequencies array with N elements or reduced
array with roughly N/2 elements - subroutine will successfully transform
both.
If you call this function using reduced arguments list - "FFTR1DInv(F,A)"
- you must pass FULL array with N elements (although higher N/2 are still
not used) because array size is used to automatically determine FFT length
-- ALGLIB --
Copyright 01.06.2009 by Bochkanov Sergey
*************************************************************************/
void fftr1dinv(const complex_1d_array &f, const ae_int_t n, real_1d_array &a);
void fftr1dinv(const complex_1d_array &f, real_1d_array &a);
/*************************************************************************
1-dimensional complex convolution.
For given A/B returns conv(A,B) (non-circular). Subroutine can automatically
choose between three implementations: straightforward O(M*N) formula for
very small N (or M), overlap-add algorithm for cases where max(M,N) is
significantly larger than min(M,N), but O(M*N) algorithm is too slow, and
general FFT-based formula for cases where two previois algorithms are too
slow.
Algorithm has max(M,N)*log(max(M,N)) complexity for any M/N.
INPUT PARAMETERS
A - array[0..M-1] - complex function to be transformed
M - problem size
B - array[0..N-1] - complex function to be transformed
N - problem size
OUTPUT PARAMETERS
R - convolution: A*B. array[0..N+M-2].
NOTE:
It is assumed that A is zero at T<0, B is zero too. If one or both
functions have non-zero values at negative T's, you can still use this
subroutine - just shift its result correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convc1d(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r);
/*************************************************************************
1-dimensional complex non-circular deconvolution (inverse of ConvC1D()).
Algorithm has M*log(M)) complexity for any M (composite or prime).
INPUT PARAMETERS
A - array[0..M-1] - convolved signal, A = conv(R, B)
M - convolved signal length
B - array[0..N-1] - response
N - response length, N<=M
OUTPUT PARAMETERS
R - deconvolved signal. array[0..M-N].
NOTE:
deconvolution is unstable process and may result in division by zero
(if your response function is degenerate, i.e. has zero Fourier coefficient).
NOTE:
It is assumed that A is zero at T<0, B is zero too. If one or both
functions have non-zero values at negative T's, you can still use this
subroutine - just shift its result correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convc1dinv(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r);
/*************************************************************************
1-dimensional circular complex convolution.
For given S/R returns conv(S,R) (circular). Algorithm has linearithmic
complexity for any M/N.
IMPORTANT: normal convolution is commutative, i.e. it is symmetric -
conv(A,B)=conv(B,A). Cyclic convolution IS NOT. One function - S - is a
signal, periodic function, and another - R - is a response, non-periodic
function with limited length.
INPUT PARAMETERS
S - array[0..M-1] - complex periodic signal
M - problem size
B - array[0..N-1] - complex non-periodic response
N - problem size
OUTPUT PARAMETERS
R - convolution: A*B. array[0..M-1].
NOTE:
It is assumed that B is zero at T<0. If it has non-zero values at
negative T's, you can still use this subroutine - just shift its result
correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convc1dcircular(const complex_1d_array &s, const ae_int_t m, const complex_1d_array &r, const ae_int_t n, complex_1d_array &c);
/*************************************************************************
1-dimensional circular complex deconvolution (inverse of ConvC1DCircular()).
Algorithm has M*log(M)) complexity for any M (composite or prime).
INPUT PARAMETERS
A - array[0..M-1] - convolved periodic signal, A = conv(R, B)
M - convolved signal length
B - array[0..N-1] - non-periodic response
N - response length
OUTPUT PARAMETERS
R - deconvolved signal. array[0..M-1].
NOTE:
deconvolution is unstable process and may result in division by zero
(if your response function is degenerate, i.e. has zero Fourier coefficient).
NOTE:
It is assumed that B is zero at T<0. If it has non-zero values at
negative T's, you can still use this subroutine - just shift its result
correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convc1dcircularinv(const complex_1d_array &a, const ae_int_t m, const complex_1d_array &b, const ae_int_t n, complex_1d_array &r);
/*************************************************************************
1-dimensional real convolution.
Analogous to ConvC1D(), see ConvC1D() comments for more details.
INPUT PARAMETERS
A - array[0..M-1] - real function to be transformed
M - problem size
B - array[0..N-1] - real function to be transformed
N - problem size
OUTPUT PARAMETERS
R - convolution: A*B. array[0..N+M-2].
NOTE:
It is assumed that A is zero at T<0, B is zero too. If one or both
functions have non-zero values at negative T's, you can still use this
subroutine - just shift its result correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convr1d(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r);
/*************************************************************************
1-dimensional real deconvolution (inverse of ConvC1D()).
Algorithm has M*log(M)) complexity for any M (composite or prime).
INPUT PARAMETERS
A - array[0..M-1] - convolved signal, A = conv(R, B)
M - convolved signal length
B - array[0..N-1] - response
N - response length, N<=M
OUTPUT PARAMETERS
R - deconvolved signal. array[0..M-N].
NOTE:
deconvolution is unstable process and may result in division by zero
(if your response function is degenerate, i.e. has zero Fourier coefficient).
NOTE:
It is assumed that A is zero at T<0, B is zero too. If one or both
functions have non-zero values at negative T's, you can still use this
subroutine - just shift its result correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convr1dinv(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r);
/*************************************************************************
1-dimensional circular real convolution.
Analogous to ConvC1DCircular(), see ConvC1DCircular() comments for more details.
INPUT PARAMETERS
S - array[0..M-1] - real signal
M - problem size
B - array[0..N-1] - real response
N - problem size
OUTPUT PARAMETERS
R - convolution: A*B. array[0..M-1].
NOTE:
It is assumed that B is zero at T<0. If it has non-zero values at
negative T's, you can still use this subroutine - just shift its result
correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convr1dcircular(const real_1d_array &s, const ae_int_t m, const real_1d_array &r, const ae_int_t n, real_1d_array &c);
/*************************************************************************
1-dimensional complex deconvolution (inverse of ConvC1D()).
Algorithm has M*log(M)) complexity for any M (composite or prime).
INPUT PARAMETERS
A - array[0..M-1] - convolved signal, A = conv(R, B)
M - convolved signal length
B - array[0..N-1] - response
N - response length
OUTPUT PARAMETERS
R - deconvolved signal. array[0..M-N].
NOTE:
deconvolution is unstable process and may result in division by zero
(if your response function is degenerate, i.e. has zero Fourier coefficient).
NOTE:
It is assumed that B is zero at T<0. If it has non-zero values at
negative T's, you can still use this subroutine - just shift its result
correspondingly.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void convr1dcircularinv(const real_1d_array &a, const ae_int_t m, const real_1d_array &b, const ae_int_t n, real_1d_array &r);
/*************************************************************************
1-dimensional complex cross-correlation.
For given Pattern/Signal returns corr(Pattern,Signal) (non-circular).
Correlation is calculated using reduction to convolution. Algorithm with
max(N,N)*log(max(N,N)) complexity is used (see ConvC1D() for more info
about performance).
IMPORTANT:
for historical reasons subroutine accepts its parameters in reversed
order: CorrC1D(Signal, Pattern) = Pattern x Signal (using traditional
definition of cross-correlation, denoting cross-correlation as "x").
INPUT PARAMETERS
Signal - array[0..N-1] - complex function to be transformed,
signal containing pattern
N - problem size
Pattern - array[0..M-1] - complex function to be transformed,
pattern to search withing signal
M - problem size
OUTPUT PARAMETERS
R - cross-correlation, array[0..N+M-2]:
* positive lags are stored in R[0..N-1],
R[i] = sum(conj(pattern[j])*signal[i+j]
* negative lags are stored in R[N..N+M-2],
R[N+M-1-i] = sum(conj(pattern[j])*signal[-i+j]
NOTE:
It is assumed that pattern domain is [0..M-1]. If Pattern is non-zero
on [-K..M-1], you can still use this subroutine, just shift result by K.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void corrc1d(const complex_1d_array &signal, const ae_int_t n, const complex_1d_array &pattern, const ae_int_t m, complex_1d_array &r);
/*************************************************************************
1-dimensional circular complex cross-correlation.
For given Pattern/Signal returns corr(Pattern,Signal) (circular).
Algorithm has linearithmic complexity for any M/N.
IMPORTANT:
for historical reasons subroutine accepts its parameters in reversed
order: CorrC1DCircular(Signal, Pattern) = Pattern x Signal (using
traditional definition of cross-correlation, denoting cross-correlation
as "x").
INPUT PARAMETERS
Signal - array[0..N-1] - complex function to be transformed,
periodic signal containing pattern
N - problem size
Pattern - array[0..M-1] - complex function to be transformed,
non-periodic pattern to search withing signal
M - problem size
OUTPUT PARAMETERS
R - convolution: A*B. array[0..M-1].
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void corrc1dcircular(const complex_1d_array &signal, const ae_int_t m, const complex_1d_array &pattern, const ae_int_t n, complex_1d_array &c);
/*************************************************************************
1-dimensional real cross-correlation.
For given Pattern/Signal returns corr(Pattern,Signal) (non-circular).
Correlation is calculated using reduction to convolution. Algorithm with
max(N,N)*log(max(N,N)) complexity is used (see ConvC1D() for more info
about performance).
IMPORTANT:
for historical reasons subroutine accepts its parameters in reversed
order: CorrR1D(Signal, Pattern) = Pattern x Signal (using traditional
definition of cross-correlation, denoting cross-correlation as "x").
INPUT PARAMETERS
Signal - array[0..N-1] - real function to be transformed,
signal containing pattern
N - problem size
Pattern - array[0..M-1] - real function to be transformed,
pattern to search withing signal
M - problem size
OUTPUT PARAMETERS
R - cross-correlation, array[0..N+M-2]:
* positive lags are stored in R[0..N-1],
R[i] = sum(pattern[j]*signal[i+j]
* negative lags are stored in R[N..N+M-2],
R[N+M-1-i] = sum(pattern[j]*signal[-i+j]
NOTE:
It is assumed that pattern domain is [0..M-1]. If Pattern is non-zero
on [-K..M-1], you can still use this subroutine, just shift result by K.
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void corrr1d(const real_1d_array &signal, const ae_int_t n, const real_1d_array &pattern, const ae_int_t m, real_1d_array &r);
/*************************************************************************
1-dimensional circular real cross-correlation.
For given Pattern/Signal returns corr(Pattern,Signal) (circular).
Algorithm has linearithmic complexity for any M/N.
IMPORTANT:
for historical reasons subroutine accepts its parameters in reversed
order: CorrR1DCircular(Signal, Pattern) = Pattern x Signal (using
traditional definition of cross-correlation, denoting cross-correlation
as "x").
INPUT PARAMETERS
Signal - array[0..N-1] - real function to be transformed,
periodic signal containing pattern
N - problem size
Pattern - array[0..M-1] - real function to be transformed,
non-periodic pattern to search withing signal
M - problem size
OUTPUT PARAMETERS
R - convolution: A*B. array[0..M-1].
-- ALGLIB --
Copyright 21.07.2009 by Bochkanov Sergey
*************************************************************************/
void corrr1dcircular(const real_1d_array &signal, const ae_int_t m, const real_1d_array &pattern, const ae_int_t n, real_1d_array &c);
/*************************************************************************
1-dimensional Fast Hartley Transform.
Algorithm has O(N*logN) complexity for any N (composite or prime).
INPUT PARAMETERS
A - array[0..N-1] - real function to be transformed
N - problem size
OUTPUT PARAMETERS
A - FHT of a input array, array[0..N-1],
A_out[k] = sum(A_in[j]*(cos(2*pi*j*k/N)+sin(2*pi*j*k/N)), j=0..N-1)
-- ALGLIB --
Copyright 04.06.2009 by Bochkanov Sergey
*************************************************************************/
void fhtr1d(real_1d_array &a, const ae_int_t n);
/*************************************************************************
1-dimensional inverse FHT.
Algorithm has O(N*logN) complexity for any N (composite or prime).
INPUT PARAMETERS
A - array[0..N-1] - complex array to be transformed
N - problem size
OUTPUT PARAMETERS
A - inverse FHT of a input array, array[0..N-1]
-- ALGLIB --
Copyright 29.05.2009 by Bochkanov Sergey
*************************************************************************/
void fhtr1dinv(real_1d_array &a, const ae_int_t n);
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
void fftc1d(/* Complex */ ae_vector* a, ae_int_t n, ae_state *_state);
void fftc1dinv(/* Complex */ ae_vector* a, ae_int_t n, ae_state *_state);
void fftr1d(/* Real */ ae_vector* a,
ae_int_t n,
/* Complex */ ae_vector* f,
ae_state *_state);
void fftr1dinv(/* Complex */ ae_vector* f,
ae_int_t n,
/* Real */ ae_vector* a,
ae_state *_state);
void fftr1dinternaleven(/* Real */ ae_vector* a,
ae_int_t n,
/* Real */ ae_vector* buf,
fasttransformplan* plan,
ae_state *_state);
void fftr1dinvinternaleven(/* Real */ ae_vector* a,
ae_int_t n,
/* Real */ ae_vector* buf,
fasttransformplan* plan,
ae_state *_state);
void convc1d(/* Complex */ ae_vector* a,
ae_int_t m,
/* Complex */ ae_vector* b,
ae_int_t n,
/* Complex */ ae_vector* r,
ae_state *_state);
void convc1dinv(/* Complex */ ae_vector* a,
ae_int_t m,
/* Complex */ ae_vector* b,
ae_int_t n,
/* Complex */ ae_vector* r,
ae_state *_state);
void convc1dcircular(/* Complex */ ae_vector* s,
ae_int_t m,
/* Complex */ ae_vector* r,
ae_int_t n,
/* Complex */ ae_vector* c,
ae_state *_state);
void convc1dcircularinv(/* Complex */ ae_vector* a,
ae_int_t m,
/* Complex */ ae_vector* b,
ae_int_t n,
/* Complex */ ae_vector* r,
ae_state *_state);
void convr1d(/* Real */ ae_vector* a,
ae_int_t m,
/* Real */ ae_vector* b,
ae_int_t n,
/* Real */ ae_vector* r,
ae_state *_state);
void convr1dinv(/* Real */ ae_vector* a,
ae_int_t m,
/* Real */ ae_vector* b,
ae_int_t n,
/* Real */ ae_vector* r,
ae_state *_state);
void convr1dcircular(/* Real */ ae_vector* s,
ae_int_t m,
/* Real */ ae_vector* r,
ae_int_t n,
/* Real */ ae_vector* c,
ae_state *_state);
void convr1dcircularinv(/* Real */ ae_vector* a,
ae_int_t m,
/* Real */ ae_vector* b,
ae_int_t n,
/* Real */ ae_vector* r,
ae_state *_state);
void convc1dx(/* Complex */ ae_vector* a,
ae_int_t m,
/* Complex */ ae_vector* b,
ae_int_t n,
ae_bool circular,
ae_int_t alg,
ae_int_t q,
/* Complex */ ae_vector* r,
ae_state *_state);
void convr1dx(/* Real */ ae_vector* a,
ae_int_t m,
/* Real */ ae_vector* b,
ae_int_t n,
ae_bool circular,
ae_int_t alg,
ae_int_t q,
/* Real */ ae_vector* r,
ae_state *_state);
void corrc1d(/* Complex */ ae_vector* signal,
ae_int_t n,
/* Complex */ ae_vector* pattern,
ae_int_t m,
/* Complex */ ae_vector* r,
ae_state *_state);
void corrc1dcircular(/* Complex */ ae_vector* signal,
ae_int_t m,
/* Complex */ ae_vector* pattern,
ae_int_t n,
/* Complex */ ae_vector* c,
ae_state *_state);
void corrr1d(/* Real */ ae_vector* signal,
ae_int_t n,
/* Real */ ae_vector* pattern,
ae_int_t m,
/* Real */ ae_vector* r,
ae_state *_state);
void corrr1dcircular(/* Real */ ae_vector* signal,
ae_int_t m,
/* Real */ ae_vector* pattern,
ae_int_t n,
/* Real */ ae_vector* c,
ae_state *_state);
void fhtr1d(/* Real */ ae_vector* a, ae_int_t n, ae_state *_state);
void fhtr1dinv(/* Real */ ae_vector* a, ae_int_t n, ae_state *_state);
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,837 @@
/*************************************************************************
Copyright (c) Sergey Bochkanov (ALGLIB project).
>>> SOURCE LICENSE >>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (www.fsf.org); either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is available at
http://www.fsf.org/licensing/licenses
>>> END OF LICENSE >>>
*************************************************************************/
#ifndef _integration_pkg_h
#define _integration_pkg_h
#include "ap.h"
#include "alglibinternal.h"
#include "linalg.h"
#include "specialfunctions.h"
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (DATATYPES)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
typedef struct
{
ae_int_t terminationtype;
ae_int_t nfev;
ae_int_t nintervals;
} autogkreport;
typedef struct
{
double a;
double b;
double eps;
double xwidth;
double x;
double f;
ae_int_t info;
double r;
ae_matrix heap;
ae_int_t heapsize;
ae_int_t heapwidth;
ae_int_t heapused;
double sumerr;
double sumabs;
ae_vector qn;
ae_vector wg;
ae_vector wk;
ae_vector wr;
ae_int_t n;
rcommstate rstate;
} autogkinternalstate;
typedef struct
{
double a;
double b;
double alpha;
double beta;
double xwidth;
double x;
double xminusa;
double bminusx;
ae_bool needf;
double f;
ae_int_t wrappermode;
autogkinternalstate internalstate;
rcommstate rstate;
double v;
ae_int_t terminationtype;
ae_int_t nfev;
ae_int_t nintervals;
} autogkstate;
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS C++ INTERFACE
//
/////////////////////////////////////////////////////////////////////////
namespace alglib
{
/*************************************************************************
Integration report:
* TerminationType = completetion code:
* -5 non-convergence of Gauss-Kronrod nodes
calculation subroutine.
* -1 incorrect parameters were specified
* 1 OK
* Rep.NFEV countains number of function calculations
* Rep.NIntervals contains number of intervals [a,b]
was partitioned into.
*************************************************************************/
class _autogkreport_owner
{
public:
_autogkreport_owner();
_autogkreport_owner(const _autogkreport_owner &rhs);
_autogkreport_owner& operator=(const _autogkreport_owner &rhs);
virtual ~_autogkreport_owner();
alglib_impl::autogkreport* c_ptr();
alglib_impl::autogkreport* c_ptr() const;
protected:
alglib_impl::autogkreport *p_struct;
};
class autogkreport : public _autogkreport_owner
{
public:
autogkreport();
autogkreport(const autogkreport &rhs);
autogkreport& operator=(const autogkreport &rhs);
virtual ~autogkreport();
ae_int_t &terminationtype;
ae_int_t &nfev;
ae_int_t &nintervals;
};
/*************************************************************************
This structure stores state of the integration algorithm.
Although this class has public fields, they are not intended for external
use. You should use ALGLIB functions to work with this class:
* autogksmooth()/AutoGKSmoothW()/... to create objects
* autogkintegrate() to begin integration
* autogkresults() to get results
*************************************************************************/
class _autogkstate_owner
{
public:
_autogkstate_owner();
_autogkstate_owner(const _autogkstate_owner &rhs);
_autogkstate_owner& operator=(const _autogkstate_owner &rhs);
virtual ~_autogkstate_owner();
alglib_impl::autogkstate* c_ptr();
alglib_impl::autogkstate* c_ptr() const;
protected:
alglib_impl::autogkstate *p_struct;
};
class autogkstate : public _autogkstate_owner
{
public:
autogkstate();
autogkstate(const autogkstate &rhs);
autogkstate& operator=(const autogkstate &rhs);
virtual ~autogkstate();
ae_bool &needf;
double &x;
double &xminusa;
double &bminusx;
double &f;
};
/*************************************************************************
Computation of nodes and weights for a Gauss quadrature formula
The algorithm generates the N-point Gauss quadrature formula with weight
function given by coefficients alpha and beta of a recurrence relation
which generates a system of orthogonal polynomials:
P-1(x) = 0
P0(x) = 1
Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
and zeroth moment Mu0
Mu0 = integral(W(x)dx,a,b)
INPUT PARAMETERS:
Alpha array[0..N-1], alpha coefficients
Beta array[0..N-1], beta coefficients
Zero-indexed element is not used and may be arbitrary.
Beta[I]>0.
Mu0 zeroth moment of the weight function.
N number of nodes of the quadrature formula, N>=1
OUTPUT PARAMETERS:
Info - error code:
* -3 internal eigenproblem solver hasn't converged
* -2 Beta[i]<=0
* -1 incorrect N was passed
* 1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 2005-2009 by Bochkanov Sergey
*************************************************************************/
void gqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Computation of nodes and weights for a Gauss-Lobatto quadrature formula
The algorithm generates the N-point Gauss-Lobatto quadrature formula with
weight function given by coefficients alpha and beta of a recurrence which
generates a system of orthogonal polynomials.
P-1(x) = 0
P0(x) = 1
Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
and zeroth moment Mu0
Mu0 = integral(W(x)dx,a,b)
INPUT PARAMETERS:
Alpha array[0..N-2], alpha coefficients
Beta array[0..N-2], beta coefficients.
Zero-indexed element is not used, may be arbitrary.
Beta[I]>0
Mu0 zeroth moment of the weighting function.
A left boundary of the integration interval.
B right boundary of the integration interval.
N number of nodes of the quadrature formula, N>=3
(including the left and right boundary nodes).
OUTPUT PARAMETERS:
Info - error code:
* -3 internal eigenproblem solver hasn't converged
* -2 Beta[i]<=0
* -1 incorrect N was passed
* 1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 2005-2009 by Bochkanov Sergey
*************************************************************************/
void gqgenerategausslobattorec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const double b, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Computation of nodes and weights for a Gauss-Radau quadrature formula
The algorithm generates the N-point Gauss-Radau quadrature formula with
weight function given by the coefficients alpha and beta of a recurrence
which generates a system of orthogonal polynomials.
P-1(x) = 0
P0(x) = 1
Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
and zeroth moment Mu0
Mu0 = integral(W(x)dx,a,b)
INPUT PARAMETERS:
Alpha array[0..N-2], alpha coefficients.
Beta array[0..N-1], beta coefficients
Zero-indexed element is not used.
Beta[I]>0
Mu0 zeroth moment of the weighting function.
A left boundary of the integration interval.
N number of nodes of the quadrature formula, N>=2
(including the left boundary node).
OUTPUT PARAMETERS:
Info - error code:
* -3 internal eigenproblem solver hasn't converged
* -2 Beta[i]<=0
* -1 incorrect N was passed
* 1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 2005-2009 by Bochkanov Sergey
*************************************************************************/
void gqgenerategaussradaurec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const double a, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Returns nodes/weights for Gauss-Legendre quadrature on [-1,1] with N
nodes.
INPUT PARAMETERS:
N - number of nodes, >=1
OUTPUT PARAMETERS:
Info - error code:
* -4 an error was detected when calculating
weights/nodes. N is too large to obtain
weights/nodes with high enough accuracy.
Try to use multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gqgenerategausslegendre(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Returns nodes/weights for Gauss-Jacobi quadrature on [-1,1] with weight
function W(x)=Power(1-x,Alpha)*Power(1+x,Beta).
INPUT PARAMETERS:
N - number of nodes, >=1
Alpha - power-law coefficient, Alpha>-1
Beta - power-law coefficient, Beta>-1
OUTPUT PARAMETERS:
Info - error code:
* -4 an error was detected when calculating
weights/nodes. Alpha or Beta are too close
to -1 to obtain weights/nodes with high enough
accuracy, or, may be, N is too large. Try to
use multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N/Alpha/Beta was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Returns nodes/weights for Gauss-Laguerre quadrature on [0,+inf) with
weight function W(x)=Power(x,Alpha)*Exp(-x)
INPUT PARAMETERS:
N - number of nodes, >=1
Alpha - power-law coefficient, Alpha>-1
OUTPUT PARAMETERS:
Info - error code:
* -4 an error was detected when calculating
weights/nodes. Alpha is too close to -1 to
obtain weights/nodes with high enough accuracy
or, may be, N is too large. Try to use
multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N/Alpha was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gqgenerategausslaguerre(const ae_int_t n, const double alpha, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Returns nodes/weights for Gauss-Hermite quadrature on (-inf,+inf) with
weight function W(x)=Exp(-x*x)
INPUT PARAMETERS:
N - number of nodes, >=1
OUTPUT PARAMETERS:
Info - error code:
* -4 an error was detected when calculating
weights/nodes. May be, N is too large. Try to
use multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N/Alpha was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
W - array[0..N-1] - array of quadrature weights.
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gqgenerategausshermite(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &w);
/*************************************************************************
Computation of nodes and weights of a Gauss-Kronrod quadrature formula
The algorithm generates the N-point Gauss-Kronrod quadrature formula with
weight function given by coefficients alpha and beta of a recurrence
relation which generates a system of orthogonal polynomials:
P-1(x) = 0
P0(x) = 1
Pn+1(x) = (x-alpha(n))*Pn(x) - beta(n)*Pn-1(x)
and zero moment Mu0
Mu0 = integral(W(x)dx,a,b)
INPUT PARAMETERS:
Alpha alpha coefficients, array[0..floor(3*K/2)].
Beta beta coefficients, array[0..ceil(3*K/2)].
Beta[0] is not used and may be arbitrary.
Beta[I]>0.
Mu0 zeroth moment of the weight function.
N number of nodes of the Gauss-Kronrod quadrature formula,
N >= 3,
N = 2*K+1.
OUTPUT PARAMETERS:
Info - error code:
* -5 no real and positive Gauss-Kronrod formula can
be created for such a weight function with a
given number of nodes.
* -4 N is too large, task may be ill conditioned -
x[i]=x[i+1] found.
* -3 internal eigenproblem solver hasn't converged
* -2 Beta[i]<=0
* -1 incorrect N was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes,
in ascending order.
WKronrod - array[0..N-1] - Kronrod weights
WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
corresponding to extended Kronrod nodes).
-- ALGLIB --
Copyright 08.05.2009 by Bochkanov Sergey
*************************************************************************/
void gkqgeneraterec(const real_1d_array &alpha, const real_1d_array &beta, const double mu0, const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
/*************************************************************************
Returns Gauss and Gauss-Kronrod nodes/weights for Gauss-Legendre
quadrature with N points.
GKQLegendreCalc (calculation) or GKQLegendreTbl (precomputed table) is
used depending on machine precision and number of nodes.
INPUT PARAMETERS:
N - number of Kronrod nodes, must be odd number, >=3.
OUTPUT PARAMETERS:
Info - error code:
* -4 an error was detected when calculating
weights/nodes. N is too large to obtain
weights/nodes with high enough accuracy.
Try to use multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes, ordered in
ascending order.
WKronrod - array[0..N-1] - Kronrod weights
WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
corresponding to extended Kronrod nodes).
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gkqgenerategausslegendre(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
/*************************************************************************
Returns Gauss and Gauss-Kronrod nodes/weights for Gauss-Jacobi
quadrature on [-1,1] with weight function
W(x)=Power(1-x,Alpha)*Power(1+x,Beta).
INPUT PARAMETERS:
N - number of Kronrod nodes, must be odd number, >=3.
Alpha - power-law coefficient, Alpha>-1
Beta - power-law coefficient, Beta>-1
OUTPUT PARAMETERS:
Info - error code:
* -5 no real and positive Gauss-Kronrod formula can
be created for such a weight function with a
given number of nodes.
* -4 an error was detected when calculating
weights/nodes. Alpha or Beta are too close
to -1 to obtain weights/nodes with high enough
accuracy, or, may be, N is too large. Try to
use multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N was passed
* +1 OK
* +2 OK, but quadrature rule have exterior nodes,
x[0]<-1 or x[n-1]>+1
X - array[0..N-1] - array of quadrature nodes, ordered in
ascending order.
WKronrod - array[0..N-1] - Kronrod weights
WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
corresponding to extended Kronrod nodes).
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gkqgenerategaussjacobi(const ae_int_t n, const double alpha, const double beta, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
/*************************************************************************
Returns Gauss and Gauss-Kronrod nodes for quadrature with N points.
Reduction to tridiagonal eigenproblem is used.
INPUT PARAMETERS:
N - number of Kronrod nodes, must be odd number, >=3.
OUTPUT PARAMETERS:
Info - error code:
* -4 an error was detected when calculating
weights/nodes. N is too large to obtain
weights/nodes with high enough accuracy.
Try to use multiple precision version.
* -3 internal eigenproblem solver hasn't converged
* -1 incorrect N was passed
* +1 OK
X - array[0..N-1] - array of quadrature nodes, ordered in
ascending order.
WKronrod - array[0..N-1] - Kronrod weights
WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
corresponding to extended Kronrod nodes).
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gkqlegendrecalc(const ae_int_t n, ae_int_t &info, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss);
/*************************************************************************
Returns Gauss and Gauss-Kronrod nodes for quadrature with N points using
pre-calculated table. Nodes/weights were computed with accuracy up to
1.0E-32 (if MPFR version of ALGLIB is used). In standard double precision
accuracy reduces to something about 2.0E-16 (depending on your compiler's
handling of long floating point constants).
INPUT PARAMETERS:
N - number of Kronrod nodes.
N can be 15, 21, 31, 41, 51, 61.
OUTPUT PARAMETERS:
X - array[0..N-1] - array of quadrature nodes, ordered in
ascending order.
WKronrod - array[0..N-1] - Kronrod weights
WGauss - array[0..N-1] - Gauss weights (interleaved with zeros
corresponding to extended Kronrod nodes).
-- ALGLIB --
Copyright 12.05.2009 by Bochkanov Sergey
*************************************************************************/
void gkqlegendretbl(const ae_int_t n, real_1d_array &x, real_1d_array &wkronrod, real_1d_array &wgauss, double &eps);
/*************************************************************************
Integration of a smooth function F(x) on a finite interval [a,b].
Fast-convergent algorithm based on a Gauss-Kronrod formula is used. Result
is calculated with accuracy close to the machine precision.
Algorithm works well only with smooth integrands. It may be used with
continuous non-smooth integrands, but with less performance.
It should never be used with integrands which have integrable singularities
at lower or upper limits - algorithm may crash. Use AutoGKSingular in such
cases.
INPUT PARAMETERS:
A, B - interval boundaries (A<B, A=B or A>B)
OUTPUT PARAMETERS
State - structure which stores algorithm state
SEE ALSO
AutoGKSmoothW, AutoGKSingular, AutoGKResults.
-- ALGLIB --
Copyright 06.05.2009 by Bochkanov Sergey
*************************************************************************/
void autogksmooth(const double a, const double b, autogkstate &state);
/*************************************************************************
Integration of a smooth function F(x) on a finite interval [a,b].
This subroutine is same as AutoGKSmooth(), but it guarantees that interval
[a,b] is partitioned into subintervals which have width at most XWidth.
Subroutine can be used when integrating nearly-constant function with
narrow "bumps" (about XWidth wide). If "bumps" are too narrow, AutoGKSmooth
subroutine can overlook them.
INPUT PARAMETERS:
A, B - interval boundaries (A<B, A=B or A>B)
OUTPUT PARAMETERS
State - structure which stores algorithm state
SEE ALSO
AutoGKSmooth, AutoGKSingular, AutoGKResults.
-- ALGLIB --
Copyright 06.05.2009 by Bochkanov Sergey
*************************************************************************/
void autogksmoothw(const double a, const double b, const double xwidth, autogkstate &state);
/*************************************************************************
Integration on a finite interval [A,B].
Integrand have integrable singularities at A/B.
F(X) must diverge as "(x-A)^alpha" at A, as "(B-x)^beta" at B, with known
alpha/beta (alpha>-1, beta>-1). If alpha/beta are not known, estimates
from below can be used (but these estimates should be greater than -1 too).
One of alpha/beta variables (or even both alpha/beta) may be equal to 0,
which means than function F(x) is non-singular at A/B. Anyway (singular at
bounds or not), function F(x) is supposed to be continuous on (A,B).
Fast-convergent algorithm based on a Gauss-Kronrod formula is used. Result
is calculated with accuracy close to the machine precision.
INPUT PARAMETERS:
A, B - interval boundaries (A<B, A=B or A>B)
Alpha - power-law coefficient of the F(x) at A,
Alpha>-1
Beta - power-law coefficient of the F(x) at B,
Beta>-1
OUTPUT PARAMETERS
State - structure which stores algorithm state
SEE ALSO
AutoGKSmooth, AutoGKSmoothW, AutoGKResults.
-- ALGLIB --
Copyright 06.05.2009 by Bochkanov Sergey
*************************************************************************/
void autogksingular(const double a, const double b, const double alpha, const double beta, autogkstate &state);
/*************************************************************************
This function provides reverse communication interface
Reverse communication interface is not documented or recommended to use.
See below for functions which provide better documented API
*************************************************************************/
bool autogkiteration(const autogkstate &state);
/*************************************************************************
This function is used to launcn iterations of the 1-dimensional integrator
It accepts following parameters:
func - callback which calculates f(x) for given x
ptr - optional pointer which is passed to func; can be NULL
-- ALGLIB --
Copyright 07.05.2009 by Bochkanov Sergey
*************************************************************************/
void autogkintegrate(autogkstate &state,
void (*func)(double x, double xminusa, double bminusx, double &y, void *ptr),
void *ptr = NULL);
/*************************************************************************
Adaptive integration results
Called after AutoGKIteration returned False.
Input parameters:
State - algorithm state (used by AutoGKIteration).
Output parameters:
V - integral(f(x)dx,a,b)
Rep - optimization report (see AutoGKReport description)
-- ALGLIB --
Copyright 14.11.2007 by Bochkanov Sergey
*************************************************************************/
void autogkresults(const autogkstate &state, double &v, autogkreport &rep);
}
/////////////////////////////////////////////////////////////////////////
//
// THIS SECTION CONTAINS COMPUTATIONAL CORE DECLARATIONS (FUNCTIONS)
//
/////////////////////////////////////////////////////////////////////////
namespace alglib_impl
{
void gqgeneraterec(/* Real */ ae_vector* alpha,
/* Real */ ae_vector* beta,
double mu0,
ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gqgenerategausslobattorec(/* Real */ ae_vector* alpha,
/* Real */ ae_vector* beta,
double mu0,
double a,
double b,
ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gqgenerategaussradaurec(/* Real */ ae_vector* alpha,
/* Real */ ae_vector* beta,
double mu0,
double a,
ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gqgenerategausslegendre(ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gqgenerategaussjacobi(ae_int_t n,
double alpha,
double beta,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gqgenerategausslaguerre(ae_int_t n,
double alpha,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gqgenerategausshermite(ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* w,
ae_state *_state);
void gkqgeneraterec(/* Real */ ae_vector* alpha,
/* Real */ ae_vector* beta,
double mu0,
ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* wkronrod,
/* Real */ ae_vector* wgauss,
ae_state *_state);
void gkqgenerategausslegendre(ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* wkronrod,
/* Real */ ae_vector* wgauss,
ae_state *_state);
void gkqgenerategaussjacobi(ae_int_t n,
double alpha,
double beta,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* wkronrod,
/* Real */ ae_vector* wgauss,
ae_state *_state);
void gkqlegendrecalc(ae_int_t n,
ae_int_t* info,
/* Real */ ae_vector* x,
/* Real */ ae_vector* wkronrod,
/* Real */ ae_vector* wgauss,
ae_state *_state);
void gkqlegendretbl(ae_int_t n,
/* Real */ ae_vector* x,
/* Real */ ae_vector* wkronrod,
/* Real */ ae_vector* wgauss,
double* eps,
ae_state *_state);
void autogksmooth(double a,
double b,
autogkstate* state,
ae_state *_state);
void autogksmoothw(double a,
double b,
double xwidth,
autogkstate* state,
ae_state *_state);
void autogksingular(double a,
double b,
double alpha,
double beta,
autogkstate* state,
ae_state *_state);
ae_bool autogkiteration(autogkstate* state, ae_state *_state);
void autogkresults(autogkstate* state,
double* v,
autogkreport* rep,
ae_state *_state);
ae_bool _autogkreport_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _autogkreport_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _autogkreport_clear(void* _p);
void _autogkreport_destroy(void* _p);
ae_bool _autogkinternalstate_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _autogkinternalstate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _autogkinternalstate_clear(void* _p);
void _autogkinternalstate_destroy(void* _p);
ae_bool _autogkstate_init(void* _p, ae_state *_state, ae_bool make_automatic);
ae_bool _autogkstate_init_copy(void* _dst, void* _src, ae_state *_state, ae_bool make_automatic);
void _autogkstate_clear(void* _p);
void _autogkstate_destroy(void* _p);
}
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@

View File

@ -0,0 +1,918 @@
/*******************************************************************************
PolSARpro v2.0 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 (1991) of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details.
*******************************************************************************
File : also_ceos.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER
Version : 1.0
Creation : 08/2006
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : ALOS CEOS Header File
This file includes structure definitions used by alos_header.c
This software is extracted and adapted from the SIR-C GDPS OPS ceos_rd.c software
Copyright (c) 1993, California Institute of Technology. U.S.
Government Sponsorship under NASA Contract NAS7-918 is acknowledged.
Author: P. Barrett, Initiated: 11-FEB-93
The updates have been made according to the document:
"ALOS/PALSAR Level 1 product - Format Description, vol2, level 1.1/1.5"
Revision G, October 2005, JAXA, Earth Observation Researcg and Application Center
******************************************************************************/
#ifndef ALOS_CEOS_H
#define ALOS_CEOS_H
#ifdef ALOS_CEOS_READER
#include "alos_header.h"
#endif
/********************************************************************
* *
* Structures which define CEOS Data Records *
* *
*********************************************************************/
/****************************************************
* *
* Header *
* *
* ..the 12-byte preamble at the beginning of every *
* CEOS data record. *
* *
****************************************************/
typedef struct {
unsigned record_seq_no; /* record sequence number */
unsigned char first_rec_subtype; /* first record subtype */
unsigned char record_type_code; /* record type code */
unsigned char second_rec_subtype; /* second record subtype */
unsigned char third_rec_subtype; /* third record subtype */
unsigned rec_length; /* length of this record */
} hdr_t;
/********************************************************************
* *
* Structures which define Leader File *
* *
********************************************************************/
/****************************
* *
* SAR Leader File: *
* File Descriptor Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char ascii_flag[2]; /* ASCII flag */
char spare1[2]; /* spare */
char doc_format[12]; /* document format */
char format_rev[2]; /* format revision ("A") */
char rec_format_rev[2]; /* record format revision level */
char software_id[12]; /* software ID */
char file_no[4]; /* file number */
char filename[16]; /* filename */
char seq_flag[4]; /* record sequence and location type flag */
char seq_location[8]; /* sequence number location */
char seq_field_len[4]; /* sequence number field length */
char code_flag[4]; /* record code and location type flag */
char code_location[8]; /* record code location */
char code_field_len[4]; /* record code field length */
char len_flag[4]; /* record length and location type flag */
char len_location[8]; /* record length location */
char len_field_len[4]; /* record length field length */
char spare2[68]; /* spare */
char n_data_set_recs[6]; /* number of data set summary records */
char len_data_set[6]; /* record length */
char n_map_proj_recs[6]; /* number of map projection data records */
char len_map_proj[6]; /* record length */
char n_platf_recs[6]; /* number of platform position records */
char len_platf[6]; /* record length */
char n_att_recs[6]; /* number of attitude data records */
char len_att[6]; /* record length */
char n_radio_recs[6]; /* number of radiometric data records */
char len_radio[6]; /* record length */
char n_radio_comp_recs[6]; /* number of radio compensation records */
char len_radio_comp[6]; /* record length */
char n_qual_recs[6]; /* number of data quality summary records */
char len_qual[6]; /* record length */
char n_hist_recs[6]; /* number of data histogram records */
char len_hist[6]; /* record length */
char n_spectra_recs[6]; /* number of range spectra records */
char len_spectra[6]; /* record length */
char n_elev_recs[6]; /* number of digital elevation model recs */
char len_elev[6]; /* record length */
char n_update_recs[6]; /* number of radar parameter update recs */
char len_update[6]; /* record length */
char n_annot_recs[6]; /* number of annotation data records */
char len_annot[6]; /* record length */
char n_proc_recs[6]; /* number of detailed processing records */
char len_proc[6]; /* record length */
char n_calib_recs[6]; /* number of calibration data records */
char len_calib[6]; /* record length */
char n_ground[6]; /* number of ground control pts records */
char len_ground[6]; /* record length */
char spare3[6]; /* spare */
char spare4[6]; /* spare */
char spare5[6]; /* spare */
char spare6[6]; /* spare */
char spare7[6]; /* spare */
char spare8[6]; /* spare */
char spare9[6]; /* spare */
char spare10[6]; /* spare */
char spare11[6]; /* spare */
char spare12[6]; /* spare */
char n_facil_recs1[6]; /* number of facility data records #01 */
char len_facil1[8]; /* record length #01 */
char n_facil_recs2[6]; /* number of facility data records #02 */
char len_facil2[8]; /* record length #02 */
char n_facil_recs3[6]; /* number of facility data records #03 */
char len_facil3[8]; /* record length #03 */
char n_facil_recs4[6]; /* number of facility data records #04 */
char len_facil4[8]; /* record length #04 */
char n_facil_recs5[6]; /* number of facility data records #05 */
char len_facil5[8]; /* record length #05 */
char n_facil_recs6[6]; /* number of facility data records #06 */
char len_facil6[8]; /* record length #06 */
char n_facil_recs7[6]; /* number of facility data records #07 */
char len_facil7[8]; /* record length #07 */
char n_facil_recs8[6]; /* number of facility data records #08 */
char len_facil8[8]; /* record length #08 */
char n_facil_recs9[6]; /* number of facility data records #09 */
char len_facil9[8]; /* record length #09 */
char n_facil_recs10[6]; /* number of facility data records #10 */
char len_facil10[8]; /* record length #10 */
char n_facil_recs11[6]; /* number of facility data records #11 */
char len_facil11[8]; /* record length #11 */
char spare13[146]; /* spare */
} leader_descript_struct;
/****************************
* *
* SAR Leader File: *
* Data Set Summary Record *
* *
****************************/
typedef struct {
char sensid[6]; /* sensor identification */
char hyphen1[1]; /* hyphen */
char freq[2]; /* frequency band */
char hyphen2[1]; /* hyphen */
char res[2]; /* resolution mode: HI, LO, SUrvey */
char acq[2]; /* radar data acquisiton mode */
char hyphen3[1]; /* hyphen */
char tx[2]; /* transmit polarization */
char rx[2]; /* receive polarization */
char spare1[13]; /* pad structure to length 32 */
} sensor_id_t;
typedef struct {
hdr_t hdr; /* header info */
char seq_no[4]; /* Data Set Summary: record sequence number */
char SAR_channel[4]; /* SAR channel indicator */
char site_id[32]; /* site ID (3-char ID) */
char site_name[16]; /* site name */
char center_GMT[32]; /* image center GMT: YYYYMMDDhhmmssttt */
char center_MET[16]; /* image center MET: DDhhmmssttt */
char lat_scene_ctr[16]; /* latitude at scene center */
char long_scene_ctr[16]; /* longitude at scene center */
char track_angle[16]; /* track angle at image center */
char ellipsoid_name[16]; /* ellipsoid designator */
char semimajor_axis[16]; /* ellipsoid semimajor axis (km) */
char semiminor_axis[16]; /* ellipsoid semiminor axis (km) */
char earth_mass[16]; /* Earth's mass */
char gravit_constant[16]; /* gravitational constant */
char ellipsoid_j2[16]; /* ellipsoid J2 parameters */
char ellipsoid_j3[16]; /* ellipsoid J3 parameters */
char ellipsoid_j4[16]; /* ellipsoid J4 parameters */
char spare2[16]; /* spare */
char terrain_ht[16]; /* average terrain height */
char center_line[8]; /* image center line number (azimuth) */
char center_pixel[8]; /* image center pixel number (range) */
char image_length_km[16]; /* image length in km */
char image_width_km[16]; /* image width in km */
char spare3[16]; /* spare */
char n_channels[4]; /* number of SAR channels */
char spare4[4]; /* spare */
char platform_id[16]; /* platform (shuttle) id */
sensor_id_t sensor_id; /* sensor id: AAAAAA-BB-CCDD-EEFF */
char datatake_id[8]; /* datatake id */
char craft_lat[8]; /* spacecraft latitude at nadir */
char craft_long[8]; /* spacecraft longitude at nadir */
char platform_heading[8]; /* sensor platform heading (degrees) */
char clock_angle[8]; /* sensor clock angle rel to flight dir */
char incid_angle_ctr[8]; /* incidence angle at image center */
char spare5[8]; /* spare */
char wavelength[16]; /* radar wavelength (m) */
char motion_comp[2]; /* motion compensation indicator */
char rg_code_spec[16]; /* range pulse code specifier */
char rg_pulse_amp1[16]; /* range pulse amplitude coefficient #1 */
char rg_pulse_amp2[16]; /* range pulse amplitude coefficient #2 */
char rg_pulse_amp3[16]; /* range pulse amplitude coefficient #3 */
char rg_pulse_amp4[16]; /* range pulse amplitude coefficient #4 */
char rg_pulse_amp5[16]; /* range pulse amplitude coefficient #5 */
char rg_pulse_phase1[16]; /* range pulse phase coefficient #1 */
char rg_pulse_phase2[16]; /* range pulse phase coefficient #2 */
char rg_pulse_phase3[16]; /* range pulse phase coefficient #3 */
char rg_pulse_phase4[16]; /* range pulse phase coefficient #4 */
char rg_pulse_phase5[16]; /* range pulse phase coefficient #5 */
char down_link_index[8]; /* down linked data chirp extraction index */
char spare6[8]; /* spare */
char rg_sampling_rate[16]; /* range complex sampling rate */
char echo_delay[16]; /* range gate at early edge */
char rg_pulse_len[16]; /* range pulse length */
char base_band_conv[4]; /* base band conversion flag */
char rg_compressed[4]; /* range compressed flag */
char rcv_gain_like[16]; /* receiver gain for like pol */
char rcv_gain_cross[16]; /* receiver gain for cross pol */
char quant_bits[8]; /* quantization bits per channel */
char quant_descr[12]; /* quantizer description */
char dc_bias_i_comp[16]; /* DC bias I component */
char dc_bias_q_comp[16]; /* DC bias Q component */
char gain_imbalance[16]; /* gain imbalance I & Q components */
char spare7[16]; /* spare */
char spare8[16]; /* spare */
char elect_boresight[16]; /* electronic boresight */
char mech_boresight[16]; /* mechanical boresight */
char echo_tracker_flag[4]; /* echo tracker flag */
char prf[16]; /* nominal PRF */
char elev_beamwidth[16]; /* antenna elevation 3dB beam width */
char az_beamwidth[16]; /* antenna azimuth 3dB beam width */
char satellite_time[16]; /* satellite encoded binary time code */
char satellite_clock[32]; /* satellite clock time */
char satellite_incr[16]; /* satellite clock increment */
char proc_facility[16]; /* processing facility */
char hw_version[8]; /* processing h/w version */
char sw_version[8]; /* processor s/w version */
char process_code[16]; /* processing facility processor code */
char product_code[16]; /* product code */
char product_type[32]; /* product type */
char proc_algorithm[32]; /* processing algorithm */
char n_looks_az[16]; /* number of looks in azimuth*/
char n_looks_rg[16]; /* number of looks in range*/
char bandwidth_az[16]; /* bandwidth per look in azimuth */
char bandwidth_rg[16]; /* bandwidth per look in range */
char az_bandwidth[16]; /* processor bandwidth (azimuth) */
char rg_bandwidth[16]; /* processor bandwidth (range) */
char az_weighting[32]; /* weighting function (azimuth) */
char rg_weighting[32]; /* weighting function (range) */
char hddc_id[16]; /* HDDC id */
char rg_nom_res[16]; /* nominal resolution (range) */
char az_nom_res[16]; /* nominal resolution (azimuth) */
char bias[16]; /* bias */
char gain[16]; /* gain */
char along_Doppler_1[16]; /* along track Doppler frequency constant term */
char along_Doppler_2[16]; /* along track Doppler frequency linear term */
char along_Doppler_3[16]; /* along track Doppler frequency quadratic term */
char spare9[16]; /* spare */
char cross_Doppler_1[16]; /* cross track Doppler frequency constant term */
char cross_Doppler_2[16]; /* cross track Doppler frequency linear term */
char cross_Doppler_3[16]; /* cross track Doppler frequency quadratic term */
char rg_time_dir[8]; /* time direction (range) */
char az_time_dir[8]; /* time direction (azimuth) */
char along_Doppler_4[16]; /* along track Doppler frequency rate constant term */
char along_Doppler_5[16]; /* along track Doppler frequency rate linear term */
char along_Doppler_6[16]; /* along track Doppler frequency rate quadratic term */
char spare10[16]; /* spare */
char cross_Doppler_4[16]; /* cross track Doppler frequency rate constant term */
char cross_Doppler_5[16]; /* cross track Doppler frequency rate linear term */
char cross_Doppler_6[16]; /* cross track Doppler frequency rate quadratic term */
char spare11[16]; /* spare */
char line_content[8]; /* line content indicator */
char clutter_lock_flag[4]; /* clutter lock flag */
char autofocus_flag[4]; /* autofocussing flag */
char line_spacing[16]; /* line spacing (m) */
char pixel_spacing[16]; /* pixel spacing (m) */
char rg_compression[16]; /* range compression designator */
char Doppler_freq1[16]; /* Doppler center frequency constant term */
char Doppler_freq2[16]; /* Doppler center frequency linear term */
char calib_data[4]; /* calibration data indicator */
char calib_line1[8]; /* start line number of calibration at upper image */
char calib_line2[8]; /* stop line number of calibration at upper image */
char calib_line3[8]; /* start line number of calibration at bottom image */
char calib_line4[8]; /* stop line number of calibration at bottom image */
char prf_indicator[4]; /* PRF switching indicator */
char prf_line[8]; /* line locator of PRF switching */
char beam_center[16]; /* direction of a beam center in a scene center */
char yew_steering[4]; /* yew steering mode flag */
char para_number[4]; /* parameter table number of automatically setting */
char offnadir_angle[16]; /* nominal offnadir angle */
char beam_number[4]; /* antenna beam number */
char spare12[28]; /* spare */
char inc_angle_a0[20]; /* incidence angle constant term a0 */
char inc_angle_a1[20]; /* incidence angle linear term a1 */
char inc_angle_a2[20]; /* incidence angle quadratic term a2 */
char inc_angle_a3[20]; /* incidence angle cubic term a3 */
char inc_angle_a4[20]; /* incidence angle fourth term a4 */
char inc_angle_a5[20]; /* incidence angle fifth term a5 */
char annot_pts[8]; /* no. of annotation points in image */
char spare13[8]; /* spare */
char annot_line[8]; /* line number of 1st annotation start */
char annot_pixel[8]; /* pixel number of 1st annotation start */
char annot_text[16]; /* 1st annotation text */
char annot_text2[2016]; /* 2nd - 64th annotation text */
char spare14[2]; /* spare */
char spare15[24]; /* spare - system reserve */
} leader_data_summary_struct;
/****************************
* *
* SAR Leader File: *
* Map Projection Data Rec *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char spare1[16]; /* spare */
char map_proj_descr[32]; /* map projection descriptor */
char n_pixels[16]; /* number of pixels per line */
char n_lines[16]; /* number of image lines */
char pix_spacing[16]; /* pixel spacing (m) */
char line_spacing[16]; /* line spacing (m) */
char orientation[16]; /* orientation output scene */
char platform_incl[16]; /* platform inclinaison*/
char ascending_node[16]; /* ascending node */
char platform_dist[16]; /* platform distance */
char geodet_alt[16]; /* geodetic altitude */
char ground_speed[16]; /* ground speed at nadir */
char platform_heading[16]; /* platform heading */
char ellipsoid_name[32]; /* name of reference ellipsoid */
char semimajor_axis[16]; /* semimajor axis of ref ellipsoid */
char semiminor_axis[16]; /* semiminor axis of ref ellipsoid */
char datum_shift_para1[16];/* datum shift parameter referenced to Greenwith */
char datum_shift_para2[16];/* datum shift parameter perpendicular to Greenwith */
char datum_shift_para3[16];/* datum shift parameter direction of the rotation*/
char datum_shift_para4[16];/* additional datum shift parameter 1st rotation */
char datum_shift_para5[16];/* additional datum shift parameter 2nd rotation */
char datum_shift_para6[16];/* additional datum shift parameter 3rd rotation */
char scale_factor1[16]; /* scale factor of reference ellipsoid */
char map_projection[32]; /* map projection*/
char utm_descriptor[32]; /* UTM descriptor */
char utm_zone[4]; /* signature of the UTM zone */
char map_origin_fe1[16]; /* map origin (false easting) */
char map_origin_fn1[16]; /* map origin (false northing) */
char center_proj_long1[16];/* UTM center of projection longitude */
char center_proj_lat1[16]; /* UTM center of projection latitude */
char stand_para_1[16]; /* 1st standard parallel */
char stand_para_2[16]; /* 2nd standard parallel */
char scale_factor2[16]; /* UTM scale factor */
char ups_descriptor[32]; /* UPS descriptor */
char center_proj_long2[16];/* UPS center of projection longitude */
char center_proj_lat2[16]; /* UPS center of projection latitude */
char scale_factor3[16]; /* UPS scale factor */
char proj_desc[32]; /* projection descriptor */
char map_origin_fe2[16]; /* map origin (false easting) */
char map_origin_fn2[16]; /* map origin (false northing) */
char center_proj_long3[16];/* UTM center of projection longitude */
char center_proj_lat3[16]; /* UTM center of projection latitude */
char stand_para_3[16]; /* standard parallel */
char stand_para_4[16]; /* standard parallel */
char spare2[16]; /* spare */
char spare3[16]; /* spare */
char spare4[16]; /* spare */
char spare5[16]; /* spare */
char spare6[16]; /* spare */
char spare7[64]; /* spare */
char near_early_no[16]; /* near-early northing */
char near_early_ea[16]; /* near-early easting */
char far_early_no[16]; /* far-early northing */
char far_early_ea[16]; /* far_early easting */
char far_late_no[16]; /* far-late northing */
char far_late_ea[16]; /* far-late easting */
char near_late_no[16]; /* near-late northing */
char near_late_ea[16]; /* near-late easting */
char near_early_lat[16]; /* near-early latitude */
char near_early_long[16]; /* near-early longitude */
char far_early_lat[16]; /* far-early latitude */
char far_early_long[16]; /* far_early longitude */
char far_late_lat[16]; /* far-late latitude */
char far_late_long[16]; /* far-late longitude */
char near_late_lat[16]; /* near-late latitude */
char near_late_long[16]; /* near-late longitude */
char spare8[16]; /* spare */
char spare9[16]; /* spare */
char spare10[16]; /* spare */
char spare11[16]; /* spare */
char coeff_aij_1[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_2[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_3[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_4[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_5[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_6[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_7[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_aij_8[20]; /* Eight coefficients: A11, A12, A13 ... A24 */
char coeff_bij_1[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_2[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_3[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_4[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_5[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_6[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_7[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char coeff_bij_8[20]; /* Eight coefficients: B11, B12, B13 ... B24 */
char spare12[36]; /* spare */
} leader_map_proj_struct;
/****************************
* *
* SAR Leader File: *
* Platform Position Rec *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char orbit_design[32]; /* orbital elements designator */
char orbital_elt1[16]; /* 1st orbital element (m) */
char orbital_elt2[16]; /* 2nd orbital element (m) */
char orbital_elt3[16]; /* 3rd orbital element (m) */
char orbital_elt4[16]; /* 4th orbital element (m) */
char orbital_elt5[16]; /* 5th orbital element (m) */
char orbital_elt6[16]; /* 6th orbital element (m) */
char n_data_sets[4]; /* number of data sets */
char year[4]; /* year of first data point */
char month[4]; /* month of first data point */
char day[4]; /* day of first data point */
char day_in_year[4]; /* day in year of first data point */
char sec_in_day[22]; /* seconds in day of first data point */
char interval[22]; /* time interval between data points (s) */
char coord_sys[64]; /* reference coordinate system */
char hour_angle[22]; /* GMT hour angle (degrees) */
char along_track_err1[16]; /* along track position error (m) */
char across_track_err1[16];/* across track position error (m) */
char radial_track_err1[16];/* radial track position error (m) */
char along_track_err2[16]; /* along track velocity error (m/s) */
char across_track_err2[16];/* across track velocity error (m/s) */
char radial_track_err2[16];/* radial track velocity error (m/s) */
char pos_vel_vec[28][6][22];/* (X,Y,Z) position and velocity vector of data points */
char spare1[18]; /* spare */
char occ_flag[1]; /* occurrence flag */
char spare2[579]; /* spare */
} leader_platf_pos_struct;
/****************************
* *
* SAR Leader File: *
* Attitude Data Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char n_data_sets[4]; /* number of attitude data sets */
char attitude_data[62][120];/* attitude data points */
char spare1[736]; /* spare */
} leader_attitude_struct;
/****************************
* *
* SAR Leader File: *
* Radiometric Data Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char seq_no[4]; /* radiometric data record seq number */
char n_data_sets[4]; /* number of radiometric data record fields */
char calib_factor[16]; /* calibration factor */
char dt11_real[16]; /* real part of transmit distorsion matrix DT(1,1) */
char dt11_imag[16]; /* imag part of transmit distorsion matrix DT(1,1) */
char dt12_real[16]; /* real part of transmit distorsion matrix DT(1,2) */
char dt12_imag[16]; /* imag part of transmit distorsion matrix DT(1,2) */
char dt21_real[16]; /* real part of transmit distorsion matrix DT(2,1) */
char dt21_imag[16]; /* imag part of transmit distorsion matrix DT(2,1) */
char dt22_real[16]; /* real part of transmit distorsion matrix DT(2,2) */
char dt22_imag[16]; /* imag part of transmit distorsion matrix DT(2,2) */
char dr11_real[16]; /* real part of receive distorsion matrix DT(1,1) */
char dr11_imag[16]; /* imag part of receive distorsion matrix DT(1,1) */
char dr12_real[16]; /* real part of receive distorsion matrix DT(1,2) */
char dr12_imag[16]; /* imag part of receive distorsion matrix DT(1,2) */
char dr21_real[16]; /* real part of receive distorsion matrix DT(2,1) */
char dr21_imag[16]; /* imag part of receive distorsion matrix DT(2,1) */
char dr22_real[16]; /* real part of receive distorsion matrix DT(2,2) */
char dr22_imag[16]; /* imag part of receive distorsion matrix DT(2,2) */
char spare1[9568]; /* spare */
} leader_radio_struct;
/****************************
* *
* SAR Leader File: *
* Data Quality Summary *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char seq_no[4]; /* record sequence number */
char sar_channel[4]; /* sar channel indicator */
char calibr_date[6]; /* calibration date */
char n_channels[4]; /* number of channels */
char islr[16]; /* integrated side lobe ratio */
char pslr[16]; /* peak side lobe ratio */
char az_ambig[16]; /* azimuth ambiguity */
char rg_ambig[16]; /* range ambiguity */
char snr_est[16]; /* signal-to-noise ratio estimate */
char ber[16]; /* bit error rate */
char slant_rg_res[16]; /* nominal slant range resolution */
char az_res[16]; /* nominal azimuth resolution */
char radio_res[16]; /* nominal radiometric resolution */
char dynam_rg[16]; /* instantaneous dynamic range */
char abs_radio_unc[16]; /* absolute radio calibration uncertainty */
char pha_radio_unc[16]; /* phase radio calibration uncertainty */
char rad_pha_unc[32][16]; /* relative magnitude phase calibration uncertainty channel 1*/
char along_track_err[16]; /* absolute location error along track */
char across_track_err[16]; /* absolute location error across track */
char scale_line_err[16]; /* geometric distorsion scale in line direction */
char scale_pix_err[16]; /* geometric distorsion scale in pixel direction */
char skew_err[16]; /* geometric distorsion scew */
char scene_err[16]; /* scene orientation error */
char track_mis[32][16]; /* along - across track relative misregistration error channel 1 */
char spare[278]; /* spare */
} leader_data_qual_struct;
/****************************
* *
* SAR Leader File: *
* Facility Data Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char seq_no[4]; /* record sequence number */
char spare1[50]; /* spare */
} leader_facility_struct;
/****************************
* *
* SAR Leader File: *
* Facility Data Record 11 *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char seq_no[4]; /* record sequence number */
char coefficient[20][20]; /* coefficients for map projection */
char calib_indic[4]; /* calibration indicator */
char start_line_up[8]; /* start line number of calibration at upper image */
char stop_line_up[8]; /* stop line number of calibration at upper image */
char start_line_bo[8]; /* start line number of calibration at bottom image */
char stop_line_bo[8]; /* stop line number of calibration at bottom image */
char prf_indic[4]; /* PRF switching indicator */
char prf_line[8]; /* line locator of PRF switching */
char sar_process_line[8]; /* SAR processing start line number */
char loss_lines[8]; /* number of loss lines */
char loss_lines_rg[8]; /* number of loss range lines */
char spare1[312]; /* spare */
char spare2[224]; /* spare */
} leader_facility11_struct;
/********************************************************************
* *
* Structures which define Imagery Options File *
* *
********************************************************************/
/****************************
* *
* Imagery Options File *
* File Descriptor Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char ascii_flag[2]; /* ASCII flag */
char spare1[2]; /* spare */
char doc_format[12]; /* control document */
char format_rev[2]; /* document revision ("$A", then "$B", etc. */
char rec_format_rev[2]; /* record format revision level */
char software_id[12]; /* software ID */
char file_no[4]; /* file number */
char filename[16]; /* filename */
char seq_flag[4]; /* record sequence and location type flag */
char seq_location[8]; /* sequence number location */
char seq_field_len[4]; /* sequence number field length */
char code_flag[4]; /* record code and location type flag */
char code_location[8]; /* record code location */
char code_field_len[4]; /* record code field length */
char len_flag[4]; /* record length and location type flag */
char len_location[8]; /* record length location */
char len_field_len[4]; /* record length field length */
char spare2[68]; /* spare */
char n_sar_recs[6]; /* number of SAR data records */
char sar_rec_len[6]; /* SAR data record length (bytes) */
char spare3[24]; /* spare */
char bits_sample[4]; /* number of bits per sample/pixel */
char pixels_group[4]; /* number of pixels per data group */
char bytes_group[4]; /* number of bytes per data group */
char spare4[4]; /* spare */
char sar_channels[4]; /* number of SAR channels */
char n_lines[8]; /* number of lines per data set */
char left_pixels[4]; /* number of left border pixels per line */
char n_pixels[8]; /* number of pixels per line */
char right_pixels[4]; /* number of right border pixels */
char top_lines[4]; /* number of top border scan lines */
char bottom_lines[4]; /* number of bottom border scan lines */
char interleave[4]; /* interleaving indicator */
char recs_line[2]; /* number of records per line */
char recs_channel[2]; /* number of records per channel */
char prefix_len[4]; /* length of prefix data per line */
char bytes_line[8]; /* number of bytes per line */
char suffix_len[4]; /* length of suffix data per line */
char prefix_flag[4]; /* prefix / suffix repeat flag */
char line_locator[8]; /* sample data line number locator */
char sar_locator[8]; /* SAR channel number locator */
char time_locator[8]; /* time of SAR data line locator */
char left_locator[8]; /* left-fill count locator */
char right_locator[8]; /* right-fill count locator */
char pad_pix[4]; /* pad pixels present indicator */
char spare5[28]; /* spare */
char data_locator[8]; /* SAR data line quality code locator */
char calib_locator[8]; /* calibration information field locator */
char gain_locator[8]; /* gain values field locator */
char bias_locator[8]; /* bias values field locator */
char sar_format[28]; /* SAR data format type indicator */
char sar_code[4]; /* SAR data format type code */
char n_left_fill[4]; /* number of left fill bits within pixel */
char n_right_fill[4]; /* number of right fill bits within pixel */
char max_range[8]; /* maximum data range of pixel */
char spare6[272]; /* spare */
} image_descript_struct;
/****************************
* *
* Imagery Options File *
* Signal Data Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
unsigned sar_line; /* SAR image data line number */
unsigned sar_index; /* SAR image data record index */
unsigned left_pix; /* actual count of left-fill pixels */
unsigned data_pix; /* actual count of data pixels */
unsigned right_pix; /* actual count of right-fill pixels */
unsigned sensor_flag; /* sensor parameters update flag */
unsigned sensor_year; /* sensor acquisition year */
unsigned sensor_day; /* sensor acquisition day of the year */
unsigned sensor_ms; /* sensor acquisition milliseconds of day */
short sar_channel; /* SAR channel indicator */
short sar_code; /* SAR channel code */
short t_pol; /* transmitted polarization */
short r_pol; /* received polarization */
unsigned prf; /* PRF (MHz) */
unsigned scan_id; /* scan id for scan sar mode */
short range_flag; /* onboard range compressed flag */
short chirp_des; /* pulse (chirp) type designator */
unsigned chirp_len; /* chirp lenght (ns) */
unsigned chirp_coeff1; /* chirp constant coefficient (Hz) */
unsigned chirp_coeff2; /* chirp linear coefficient (Hz/micro-s) */
unsigned chirp_coeff3; /* chirp quadratic coefficient (Hz/micro-s^2) */
char spare1[8]; /* spare */
unsigned gain; /* receiver gain (dB) */
unsigned line_flag; /* nought line flag */
unsigned ant_squint1; /* antenna squint angle (millionths of deg) */
unsigned ant_elev1; /* antenna elevation angle from nadir (millionths of deg) */
unsigned ant_squint2; /* antenna squint angle (millionths of deg) */
unsigned ant_elev2; /* antenna elevation angle from nadir (millionths of deg) */
unsigned slant_data; /* slant range to 1st data sample (m) */
unsigned data_wind; /* data record window (ns) */
char spare2[4]; /* spare */
unsigned platf_pos; /* platform position parameters update flag */
unsigned platf_lat; /* platform latitude (millionths of deg) */
unsigned platf_lon; /* platform longitude (millionths of deg) */
unsigned platf_alt; /* platform altitude (m) */
unsigned platf_speed; /* platform ground speed (cm/s) */
unsigned platf_velx; /* platform velocity X (cm/s) */
unsigned platf_vely; /* platform velocity Y (cm/s) */
unsigned platf_velz; /* platform velocity Z (cm/s) */
unsigned platf_accx; /* platform acceleration X (cm/s^2) */
unsigned platf_accy; /* platform acceleration Y (cm/s^2) */
unsigned platf_accz; /* platform acceleration Z (cm/s^2) */
unsigned platf_track1; /* platform track angle (millionths of deg) */
unsigned platf_track2; /* platform track angle (millionths of deg) */
unsigned platf_pitch; /* platform pitch angle (millionths of deg) */
unsigned platf_roll; /* platform roll angle (millionths of deg) */
unsigned platf_yaw; /* platform yaw angle (millionths of deg) */
char spare3[92]; /* spare */
unsigned counter; /* counter of PALSAR frame */
char aux_data[100]; /* PALSAR auxiliary data */
} image_signal_struct;
/****************************
* *
* Imagery Options File *
* Processed Data Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
unsigned sar_line; /* SAR image data line number */
unsigned sar_index; /* SAR image data record index */
unsigned left_pix; /* actual count of left-fill pixels */
unsigned data_pix; /* actual count of data pixels */
unsigned right_pix; /* actual count of right-fill pixels */
unsigned sensor_flag; /* sensor parameters update flag */
unsigned sensor_year; /* sensor acquisition year */
unsigned sensor_day; /* sensor acquisition day of the year */
unsigned sensor_ms; /* sensor acquisition milliseconds of day */
short sar_channel; /* SAR channel indicator */
short sar_code; /* SAR channel code */
short t_pol; /* transmitted polarization */
short r_pol; /* received polarization */
unsigned prf; /* PRF (MHz) */
unsigned scan_id; /* scan id for scan sar mode */
unsigned slant_1st; /* slant range to 1st pixel */
unsigned slant_mid; /* slant range to mid pixel */
unsigned slant_lst; /* slant range to last pixel */
unsigned doppler_1st; /* Doppler centroid value at 1st pixel */
unsigned doppler_mid; /* Doppler centroid value at mid pixel */
unsigned doppler_lst; /* Doppler centroid value at last pixel */
unsigned az_fm_1st; /* azimuth FM rate of 1st pixel */
unsigned az_fm_mid; /* azimuth FM rate of mid pixel */
unsigned az_fm_lst; /* azimuth FM rate of last pixel */
unsigned look_angle; /* look angle of nadir (millionths of deg) */
unsigned az_squint; /* azimuth squint angle (millionths of deg) */
unsigned spare1[20]; /* spare */
unsigned geo_ref; /* geographic ref. parameter update flag */
unsigned lat_1st; /* latitude of 1st pixel */
unsigned lat_mid; /* latitude of mid pixel */
unsigned lat_lst; /* latitude of last pixel */
unsigned lon_1st; /* longitude of 1st pixel */
unsigned lon_mid; /* longitude of mid pixel */
unsigned lon_lst; /* longitude of last pixel */
unsigned northing_1st; /* northing of 1st pixel */
char spare2[4]; /* spare */
unsigned northing_lst; /* northing of last pixel */
unsigned easting_1st; /* easting of 1st pixel */
char spare3[4]; /* spare */
unsigned easting_lst; /* easting of last pixel */
unsigned line_heading; /* line heading */
} image_process_struct;
/********************************************************************
* *
* Structures which define trailer File *
* *
********************************************************************/
/****************************
* *
* SAR Trailer File *
* File Descriptor Record *
* *
****************************/
typedef struct {
hdr_t hdr; /* header info */
char ascii_flag[2]; /* ASCII flag */
char spare1[2]; /* spare */
char doc_format[12]; /* document format */
char format_rev[2]; /* format revision ("A") */
char rec_format_rev[2]; /* record format revision level */
char software_id[12]; /* software ID */
char file_no[4]; /* file number */
char filename[16]; /* filename */
char seq_flag[4]; /* record sequence and location type flag */
char seq_location[8]; /* sequence number location */
char seq_field_len[4]; /* sequence number field length */
char code_flag[4]; /* record code and location type flag */
char code_location[8]; /* record code location */
char code_field_len[4]; /* record code field length */
char len_flag[4]; /* record length and location type flag */
char len_location[8]; /* record length location */
char len_field_len[4]; /* record length field length */
char spare2[68]; /* spare */
char n_data_set_recs[6]; /* number of data set summary records */
char len_data_set[6]; /* record length */
char n_map_proj_recs[6]; /* number of map projection data records */
char len_map_proj[6]; /* record length */
char n_platf_recs[6]; /* number of platform position records */
char len_platf[6]; /* record length */
char n_att_recs[6]; /* number of attitude data records */
char len_att[6]; /* record length */
char n_radio_recs[6]; /* number of radiometric data records */
char len_radio[6]; /* record length */
char n_radio_comp_recs[6]; /* number of radio compensation records */
char len_radio_comp[6]; /* record length */
char n_qual_recs[6]; /* number of data quality summary records */
char len_qual[6]; /* record length */
char n_hist_recs[6]; /* number of data histogram records */
char len_hist[6]; /* record length */
char n_spectra_recs[6]; /* number of range spectra records */
char len_spectra[6]; /* record length */
char n_elev_recs[6]; /* number of digital elevation model recs */
char len_elev[6]; /* record length */
char n_update_recs[6]; /* number of radar parameter update recs */
char len_update[6]; /* record length */
char n_annot_recs[6]; /* number of annotation data records */
char len_annot[6]; /* record length */
char n_proc_recs[6]; /* number of detailed processing records */
char len_proc[6]; /* record length */
char n_calib_recs[6]; /* number of calibration data records */
char len_calib[6]; /* record length */
char n_ground[6]; /* number of ground control pts records */
char len_ground[6]; /* record length */
char spare3[60]; /* spare */
char n_facil_recs1[6]; /* number of facility data records #01 */
char len_facil1[8]; /* record length #01 */
char n_facil_recs2[6]; /* number of facility data records #02 */
char len_facil2[8]; /* record length #02 */
char n_facil_recs3[6]; /* number of facility data records #03 */
char len_facil3[8]; /* record length #03 */
char n_facil_recs4[6]; /* number of facility data records #04 */
char len_facil4[8]; /* record length #04 */
char n_facil_recs5[6]; /* number of facility data records #05 */
char len_facil5[8]; /* record length #05 */
char n_facil_recs6[6]; /* number of facility data records #06 */
char len_facil6[8]; /* record length #06 */
char n_facil_recs7[6]; /* number of facility data records #07 */
char len_facil7[8]; /* record length #07 */
char n_facil_recs8[6]; /* number of facility data records #08 */
char len_facil8[8]; /* record length #08 */
char n_facil_recs9[6]; /* number of facility data records #09 */
char len_facil9[8]; /* record length #09 */
char n_facil_recs10[6]; /* number of facility data records #10 */
char len_facil10[8]; /* record length #10 */
char n_facil_recs11[6]; /* number of facility data records #11 */
char len_facil11[8]; /* record length #11 */
char low_records[6]; /* number of low res. image data records */
char low_length[6]; /* low res. image data record length */
char low_pixels[6]; /* number of pixels of low res. image data */
char low_lines[6]; /* number of lines of low res. image data */
char low_bytes[6]; /* number of bytes per one sample of low res. image data */
char spare4[116]; /* spare */
} trailer_file_struct;
/********************************************************************
* *
* Structures which define CEOS Data Files *
* *
********************************************************************/
/************************
* *
* SAR Leader File *
* *
************************/
typedef struct {
leader_descript_struct descript;
leader_data_summary_struct data_set;
leader_map_proj_struct map_proj;
leader_platf_pos_struct platform;
leader_attitude_struct attitude;
leader_radio_struct radio;
leader_data_qual_struct data_qual;
leader_facility_struct facility;
leader_facility11_struct facility11;
} leader_file_struct;
/****************************
* *
* Imagery Options File *
* *
****************************/
typedef struct {
image_descript_struct descript;
image_signal_struct signal;
image_process_struct process;
} image_file_struct;
#endif /* ALOS_OCEOS_H */

View File

@ -0,0 +1,608 @@
/*******************************************************************************
PolSARpro v2.0 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 (1991) of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details.
********************************************************************************
File : alos_header.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER
Version : 1.0
Creation : 08/2006
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : ALOS CEOS Header File
This file includes definitions and constants used by alos_header.c
This software is extracted and adapted from the SIR-C GDPS OPS ceos_rd.c software
Copyright (c) 1993, California Institute of Technology. U.S.
Government Sponsorship under NASA Contract NAS7-918 is acknowledged.
Author: P. Barrett, Initiated: 11-FEB-93
The updates have been made according to the document:
"ALOS/PALSAR Level 1 product - Format Description, vol2, level 1.1/1.5"
Revision G, October 2005, JAXA, Earth Observation Researcg and Application Center
******************************************************************************/
#ifndef ALOS_CEOS_RD_H
#define ALOS_CEOS_RD_H
/* Miscellaneous */
#define SPACE '\040' /* ascii space character */
/********************************************************************
* *
* Titles *
* *
********************************************************************/
#define STARS1 "***************************************************"
#define STARS2 "* *"
#define DATAS1 "*** Data Set"
#define DATAS2 "***"
#define TABLE1 "*** Table Entry"
#define TABLE2 "***"
#define SARL_TITLE "* SAR Leader File:"
#define IMG_TITLE "* Imagery Options File:"
#define SART_TITLE "* SAR Trailer File:"
#define DESCR_REC "* File Descriptor Record"
#define PTR_REC_SARL "* File Pointer Record: SAR Leader"
#define PTR_REC_IMG "* File Pointer Record: Imagery Options"
#define PTR_REC_SART "* File Pointer Record: SAR Trailer"
#define TEXT "* Text Record"
#define DSS_REC "* Data Set Summary Record"
#define MAP_REC "* Map Projection Data Record"
#define PLATF_REC "* Platform Position Record"
#define ATT_REC "* Attitude Data Record"
#define RADIO_REC "* Radiometric Data Record"
#define QUAL_REC "* Data Quality Summary Record"
#define FACIL_REC "* Facility Data Record "
#define PREFIX_REC "* First Prefix Data Record"
/* constants */
/*#define MAX_MISSING_PAIRS 5*/ /* Max pairs of missing rg lines/chan */
#define NAME_LEN 128 /* short string length */
#define LONG_NAME_LEN 128 /* long string length */
#define MAX_POLS 4 /* max number of pols: HH, HV, VV, VH */
/********************************************************************
* *
* Text Fields *
* *
********************************************************************/
/* Common Header */
#define HDR_SEQ "Record Sequence Number:"
#define HDR_1SUB "First Record Subtype Code:"
#define HDR_TYPE "Record Type Code:"
#define HDR_2SUB "Second Record Subtype Code:"
#define HDR_3SUB "Third Record Subtype Code:"
#define HDR_LEN "Record Length:"
/* SAR Leader: File Descriptor Headers */
#define ASCII_FL "Data Format (A = ASCII):"
#define DOC_FORM "Format Control Document:"
#define FORM_REV "Format Control Document Version:"
#define REC_REV "Record Format Revision Level:"
#define FILE_NO "File Number:"
#define FILE_NAME "File Name:"
#define FSEQ "Record Sequence and Location Type Flag:"
#define LOC_NO "Sequence Number Location:"
#define SEQ_FLD_L "Sequence Number Field Length:"
#define LOC_TYPE "Record Code and Location Type Flag:"
#define RCODE_LOC "Record Code Location:"
#define RCODE_FLD_L "Record Code Field Length:"
#define FLGT "Record Length and Location Type Flag:"
#define REC_LEN_LOC "Record Length Location:"
#define REC_LEN_LEN "Record Length Field Length:"
#define RECORD_LEN "Record Length (bytes):"
#define DS_FILE "Number of Data Set Summary Records:"
#define MP_FILE "Number of Map Projection Records:"
#define PLATF_FILE "Number of Platform Position Records:"
#define ATT_FILE "Number of Attitude Records:"
#define RADIO_FILE "Number of Radiometric Data Records:"
#define RADIOC_FILE "Number of Radiometric Compensation Records:"
#define QUAL_FILE "Number of Data Quality Summary Records:"
#define HIST_FILE "Number of Data Histogram Records:"
#define SPEC_FILE "Number of Range Spectra Records:"
#define ELEV_FILE "Number of Digital Elevation Model Records:"
#define UPD_FILE "Number of Radar Parameter Update Records:"
#define ANNOT_FILE "Number of Annotation Data Records:"
#define PROC_FILE "Number of Detailed Processing Records:"
#define CAL_FILE "Number of Calibration Data Records:"
#define GROUND_FILE "Number of Ground Control Points Records:"
#define FAC_FILE1 "Number of Facility Data Record #01:"
#define RECORD_LEN1 "Record Length (bytes) #01:"
#define FAC_FILE2 "Number of Facility Data Record #02:"
#define RECORD_LEN2 "Record Length (bytes) #02:"
#define FAC_FILE3 "Number of Facility Data Record #03:"
#define RECORD_LEN3 "Record Length (bytes) #03:"
#define FAC_FILE4 "Number of Facility Data Record #04:"
#define RECORD_LEN4 "Record Length (bytes) #04:"
#define FAC_FILE5 "Number of Facility Data Record #05:"
#define RECORD_LEN5 "Record Length (bytes) #05:"
#define FAC_FILE6 "Number of Facility Data Record #06:"
#define RECORD_LEN6 "Record Length (bytes) #06:"
#define FAC_FILE7 "Number of Facility Data Record #07:"
#define RECORD_LEN7 "Record Length (bytes) #07:"
#define FAC_FILE8 "Number of Facility Data Record #08:"
#define RECORD_LEN8 "Record Length (bytes) #08:"
#define FAC_FILE9 "Number of Facility Data Record #09:"
#define RECORD_LEN9 "Record Length (bytes) #09:"
#define FAC_FILE10 "Number of Facility Data Record #10:"
#define RECORD_LEN10 "Record Length (bytes) #10:"
#define FAC_FILE11 "Number of Facility Data Record #11:"
#define RECORD_LEN11 "Record Length (bytes) #11:"
/* SAR Leader: Data Set Summary Headers */
#define SEQ_NO "Sequence Number:"
#define SAR_CHAN "SAR Channel Indicator:"
#define SITE_ID "Site ID:"
#define SITE_NAME "Site Name:"
#define CTR_GMT "GMT, Image Center (YYYY/MM/DD hh:mm:ss.ttt):"
#define CTR_MET "MET, Image Center (DD hh:mm:ss.ttt):"
#define LAT_CTR "Geodetic Latitude at Image Center (deg):"
#define LONG_CTR "Geodetic Longitude at Image Center (deg):"
#define TRK_ANG_CTR "Track Angle at Image Center (deg):"
#define ELLIPSE_NAME "Ellipsoid Designator:"
#define MAJOR_AXIS "Ellipsoid Semimajor Axis (km):"
#define MINOR_AXIS "Ellipsoid Semiminor Axis (km):"
#define EARTH_MASS "Earth's Mass:"
#define GRAVIT_CST "Gravitational Constant:"
#define ELLIPSOIDJ2 "Ellipsoid J2 Parameter:"
#define ELLIPSOIDJ3 "Ellipsoid J3 Parameter:"
#define ELLIPSOIDJ4 "Ellipsoid J4 Parameter:"
#define TERR_HT "Average Terrain Height above Ellipsoid (m):"
#define CTR_LINE "Image Center Line Number:"
#define CTR_PIX "Image Center Pixel Number:"
#define IMG_LEN "Image Length (km):"
#define IMG_WID "Image Width (km):"
#define N_CHAN "Number of SAR Polarization Channels:"
#define PLAT_ID "Sensor Platform Mission ID:"
#define SENSE_ID "Sensor ID:"
#define BAND "SAR Band:"
#define RESOL "Resolution (HI = 20 MHz, LO = 10 MHz):"
#define ACQ "Data Acquisition Mode:"
#define TX_POL "Transmit Polarization:"
#define RX_POL "Receive Polarization:"
#define DT_ID "Datatake ID:"
#define CRAFT_LAT "Platform Geodetic Latitude at Nadir (deg):"
#define CRAFT_LONG "Platform Geodetic Longitude at Nadir (deg):"
#define PLAT_HD "Platform Heading at Nadir (deg):"
#define CLOCK_ANG "Clock Angle (Left: -90, Right: +90) (deg):"
#define INC_ANGLE "Incidence Angle at Image Center (deg):"
#define WAVE_LEN "Radar Wavelength (m):"
#define MOTION "Motion Compensation (00 = No Compensation):"
#define CD_SPEC "Range Pulse Code Specifier:"
#define CHIRP_A1 "Range Chirp Amplitude Coefficient #1:"
#define CHIRP_A2 "Range Chirp Amplitude Coefficient #2:"
#define CHIRP_A3 "Range Chirp Amplitude Coefficient #3:"
#define CHIRP_A4 "Range Chirp Amplitude Coefficient #4:"
#define CHIRP_A5 "Range Chirp Amplitude Coefficient #5:"
#define CHIRP_P1 "Range Chirp Phase Coefficient #1:"
#define CHIRP_P2 "Range Chirp Phase Coefficient #2:"
#define CHIRP_P3 "Range Chirp Phase Coefficient #3:"
#define CHIRP_P4 "Range Chirp Phase Coefficient #4:"
#define CHIRP_P5 "Range Chirp Phase Coefficient #5:"
#define DOWN_LINK "Down Link Data Chirp Extraction Index:"
#define RG_SAMPL "Range Complex Sampling Rate (MHz):"
#define ECHO_DLAY "One-Way Echo Delay Time (microsec):"
#define PULSE_LEN "Range Pulse Duration (microsec):"
#define BAND_CONV "Base Band Conversion ?:"
#define COMPR_FLAG "Range Compressed ?:"
#define LIKE_GAIN "Receiver Gain for Like Polarization (dB):"
#define CROSS_GAIN "Receiver Gain for Cross Polarization (dB):"
#define Q_BITS "Quantization in Bits per Channel:"
#define QUANT_DES "Quantization Descriptor:"
#define BIAS_I "DC Biais I Component:"
#define BIAS_Q "DC Biais Q Component:"
#define GAIN_IM "Gain Imbalance I & Q Components:"
#define ELECT_BORE "Antenna Electronic Boresight (deg):"
#define MECH_BORE "Antenna Mechanical Boresight (deg):"
#define ECHO_TRK "Echo Tracking:"
#define PRF "Nominal PRF (mHz):"
#define RG_BEAMW "Antenna Elevation 3 dB Beamwidth (deg):"
#define AZ_BEAMW "Antenna Azimuth 3 dB Beamwidth (deg):"
#define SAT_TIME "Satellite Encoded Binary Time Code:"
#define SAT_CLOCK "Satellite Clock Time:"
#define SAT_INCR "Satellite Clock Increment:"
#define HW_VERS "Hardware Version:"
#define SW_VERS "Software Version:"
#define PROC_FAC "Processing Facility:"
#define PROC_CODE "Process Code:"
#define PROD_CODE "Product Level Code:"
#define PROD_TYPE "Product Type:"
#define PROC_ALG "Processing Algorithm:"
#define N_LOOKS_AZ "Total Number of Looks in Azimuth:"
#define N_LOOKS_RG "Total Number of Looks in Range:"
#define BNDWTH_AZ "Bandwidth per Look in Azimuth (Hz):"
#define BNDWTH_RG "Bandwidth per Look in Range (Hz):"
#define AZ_BNDWTH "Total Processor Azimuth Bandwidth (Hz):"
#define RG_BNDWTH "Total Processor Range Bandwidth (kHz):"
#define AZ_WEIGHT "Azimuth Weighting Function:"
#define RG_WEIGHT "Range Weighting Function:"
#define HDDC "HDDC ID:"
#define RG_RES "Nominal Range Resolution (m):"
#define AZ_RES "Nominal Azimuth Resolution (m):"
#define GAIN "Processor Gain for Noise Data:"
#define BIAS "Linear Radiometric Conversion Factor:"
#define AL_DOPPLER1 "Along Track Doppler Constant Term:"
#define AL_DOPPLER2 "Along Track Doppler Linear Term:"
#define AL_DOPPLER3 "Along Track Doppler Quadratic Term:"
#define AC_DOPPLER1 "Across Track Doppler Constant Term:"
#define AC_DOPPLER2 "Across Track Doppler Linear Term:"
#define AC_DOPPLER3 "Across Track Doppler Quadratic Term:"
#define RG_TIME "Time Direction Indicator (Range):"
#define AZ_TIME "Time Direction Indicator (Azimuth):"
#define AL_DOPPLER4 "Along Track Doppler Rate Constant Term:"
#define AL_DOPPLER5 "Along Track Doppler Rate Linear Term:"
#define AL_DOPPLER6 "Along Track Doppler Rate Quadratic Term:"
#define AC_DOPPLER4 "Across Track Doppler Rate Constant Term:"
#define AC_DOPPLER5 "Across Track Doppler Rate Linear Term:"
#define AC_DOPPLER6 "Across Track Doppler Rate Quadratic Term:"
#define LINE_CON "Line Content:"
#define CLUTTER "Clutter Lock Applied ?:"
#define AUTOFOCUS "Autofocussing Applied ?:"
#define LINE_SP "Line Spacing (m):"
#define PIXEL_SP "Pixel Spacing (m):"
#define RG_COMPR "Processor Range Compression:"
#define DOPPLER_F1 "Doppler Center Frequency Constant term:"
#define DOPPLER_F2 "Doppler Center Frequency Linear term:"
#define CALIB_DATA "Calibration Data Indicator:"
#define CALIB_LINE1 "Start Line Number of Calib at Upper Image:"
#define CALIB_LINE2 "Stop Line Number of Calib at Upper Image:"
#define CALIB_LINE3 "Start Line Number of Calib at Bottom Image:"
#define CALIB_LINE4 "Stop Line Number of Calib at Bottom Image:"
#define PRF_INDIC "PRF Switching Indicator:"
#define PRF_LINE "Line Indicator of PRF Switching:"
#define BEAM_CENTER "Direction of the Beam Center in a Scene Center:"
#define YEW_STEERING "Yew Steering Mode Flag:"
#define PARA_NUMBER "Parameter Table Number of Automatic Setting:"
#define OFFNADIR_ANG "Nominal Off-Nadir Angle:"
#define BEAM_NUMBER "Antenna Beam Number:"
#define INC_ANG_A0 "Incidence Angle Constant Term:"
#define INC_ANG_A1 "Incidence Angle Linear Term:"
#define INC_ANG_A2 "Incidence Angle Quadratic Term:"
#define INC_ANG_A3 "Incidence Angle Cubic Term:"
#define INC_ANG_A4 "Incidence Angle Fourth Term:"
#define INC_ANG_A5 "Incidence Angle Fifth Term:"
#define N_ANNOT "Number of Annotation Points:"
#define ANNOT_LINE "Line Number of 1st Annotation Start:"
#define ANNOT_PIXEL "Pixel Number of 1st Annotation Start:"
#define ANNOT_TEXT "1st Annotation Text:"
#define ANNOT_TEXT2 "2nd to 64th Annotation Text:"
/* SAR Leader: Map Projection Headers */
#define MP_DESCR "Map Projection Descriptor:"
#define N_PIXELS "Number of Pixels per Image Line:"
#define N_LINES "Number of Image Lines:"
#define ORIENT "Orientation Output Scene (deg):"
#define PL_INCL "Platform Inclinaison (deg):"
#define AS_NODE "Ascending Node (deg):"
#define PL_DIST "Platform Distance at Image Center (m):"
#define ALTITUDE "Geodetic Altitude of Platform (m):"
#define SPEED "Spacecraft Speed at Nadir (m/sec):"
#define MAJOR_AXIS_M "Ellipsoid Semimajor Axis (m):"
#define MINOR_AXIS_M "Ellipsoid Semiminor Axis (m):"
#define DATUM_SHIFT1 "Datum Shift Para Referenced to Greenwitch:"
#define DATUM_SHIFT2 "Datum Shift Para Perpendicular to Greenwitch:"
#define DATUM_SHIFT3 "Datum Shift Para Direction of the Rotation:"
#define DATUM_SHIFT4 "Datum Shift Para 1st Rotation:"
#define DATUM_SHIFT5 "Datum Shift Para 2nd Rotation:"
#define DATUM_SHIFT6 "Datum Shift Para 3rd Rotation:"
#define SCALE1 "Scale Factor of Reference Ellipsoid:"
#define MAP_PROJ "Map Projection:"
#define UTM_DESC "UTM Descriptor:"
#define UTM_ZONE "UTM Zone:"
#define MAP_FE1 "Map Origin - False Easting (m):"
#define MAP_FN1 "Map Origin - False Northing (m):"
#define CTR_PRJ_LO1 "UTM Center of Projection Longitude (deg):"
#define CTR_PRJ_LA1 "UTM Center of Projection Latitude (deg):"
#define STAND_PARA1 "1st Standard Parallel:"
#define STAND_PARA2 "2nd Standard Parallel:"
#define SCALE2 "UTM Scale Factor:"
#define UPS_DESC "UPS Descriptor:"
#define CTR_PRJ_LO2 "UPS Center of Projection Longitude (deg):"
#define CTR_PRJ_LA2 "UPS Center of Projection Latitude (deg):"
#define SCALE3 "UPS Scale Factor:"
#define PROJ_DESC "Projection Descriptor:"
#define MAP_FE2 "NSP - Map Origin - False Easting (m):"
#define MAP_FN2 "NSP - Map Origin - False Northing (m):"
#define CTR_PRJ_LO3 "NSP Center of Projection Longitude (deg):"
#define CTR_PRJ_LA3 "NSP Center of Projection Latitude (deg):"
#define STAND_PARA3 "NSP - 1st Standard Parallel:"
#define STAND_PARA4 "NSP - 2nd Standard Parallel:"
#define NE_NO "Top Left Corner Northing (km):"
#define NE_EA "Top Left Corner Easting (km):"
#define FE_NO "Top Right Corner Northing (km):"
#define FE_EA "Top Right Corner Easting (km):"
#define FL_NO "Bottom Right Corner Northing (km):"
#define FL_EA "Bottom Right Corner Easting (km):"
#define NL_NO "Bottom Left Corner Northing (km):"
#define NL_EA "Bottom Left Corner Easting (km):"
#define NE_LAT "Near Range Early Time Latitude (deg):"
#define NE_LONG "Near Range Early Time Longitude (deg):"
#define FE_LAT "Far Range Early Time Latitude (deg):"
#define FE_LONG "Far Range Early Time Longitude (deg):"
#define FL_LAT "Far Range Late Time Latitude (deg):"
#define FL_LONG "Far Range Late Time Longitude (deg):"
#define NL_LAT "Near Range Late Time Latitude (deg):"
#define NL_LONG "Near Range Late Time Longitude (deg):"
#define COEFF_A11 "Coefficients A11:"
#define COEFF_A12 "Coefficients A12:"
#define COEFF_A13 "Coefficients A13:"
#define COEFF_A14 "Coefficients A14:"
#define COEFF_A21 "Coefficients A21:"
#define COEFF_A22 "Coefficients A22:"
#define COEFF_A23 "Coefficients A23:"
#define COEFF_A24 "Coefficients A24:"
#define COEFF_B11 "Coefficients B11:"
#define COEFF_B12 "Coefficients B12:"
#define COEFF_B13 "Coefficients B13:"
#define COEFF_B14 "Coefficients B14:"
#define COEFF_B21 "Coefficients B21:"
#define COEFF_B22 "Coefficients B22:"
#define COEFF_B23 "Coefficients B23:"
#define COEFF_B24 "Coefficients B24:"
/* SAR Leader: Platform Position Headers */
#define ORBIT_DESIGN "Orbital Elements Designator:"
#define ORBIT_ELT1 "1st Orbital Element:"
#define ORBIT_ELT2 "2nd Orbital Element:"
#define ORBIT_ELT3 "3rd Orbital Element:"
#define ORBIT_ELT4 "4th Orbital Element:"
#define ORBIT_ELT5 "5th Orbital Element:"
#define ORBIT_ELT6 "6th Orbital Element:"
#define PLAT_YEAR "Year of First Point (YYYY):"
#define PLAT_MONTH "Month of First Point (MM):"
#define PLAT_DAY "Day of First Point (DD):"
#define PLAT_DIY "Day of Year of First Point:"
#define PLAT_SID "Seconds in Day of First Point:"
#define PLAT_INT "Time Between Points (s):"
#define PLAT_COORD "Reference Coordinate System:"
#define PLAT_HOUR "Mean Hour Angle (deg):"
#define AL_TRACK_ERR1 "Along Track Position Error (m):"
#define AC_TRACK_ERR1 "Across Track Position Error (m):"
#define RD_TRACK_ERR1 "Radial Track Position Error (m):"
#define AL_TRACK_ERR2 "Along Track Velocity Error (m/s):"
#define AC_TRACK_ERR2 "Across Track Velocity Error (m/s):"
#define RD_TRACK_ERR2 "Radial Track Velocity Error (m/s):"
#define PLAT_POSV "Position Vector (km):"
#define PLAT_VEL "Velocity Vector (km/sec):"
#define PLAT_XYZ " x y z"
#define OCC_FLAG "Occurence Flag:"
/* SAR Leader: Attitude Data Headers */
#define ATT_DAYS "GMT Day of Year:"
#define ATT_SECS "GMT Millisecond of Day:"
#define PITCH_FLAG "Pitch Data Quality Flag:"
#define ROLL_FLAG "Roll Data Quality Flag:"
#define YAW_FLAG "Yaw Data Quality Flag:"
#define PITCH_VAL "Pitch Value (deg):"
#define ROLL_VAL "Roll Value (deg):"
#define YAW_VAL "Yaw Value (deg):"
#define PITCH_QUAL "Pitch Rate Data Quality Flag:"
#define ROLL_QUAL "Roll Rate Data Quality Flag:"
#define YAW_QUAL "Yaw Rate Data Quality Flag:"
#define PITCH_RATE "Pitch Rate Value (deg/s):"
#define ROLL_RATE "Roll Rate Value (deg/s):"
#define YAW_RATE "Yaw Rate Value (deg/s):"
/* SAR Leader: Radiometric Data Headers */
#define N_SETS "Number of Data Sets:"
#define CAL_FAC "Calibration Factor:"
#define DT11_R "Real Part of Transmit Dist. Matrix DT(1,1):"
#define DT11_I "Imag Part of Transmit Dist. Matrix DT(1,1):"
#define DT12_R "Real Part of Transmit Dist. Matrix DT(1,2):"
#define DT12_I "Imag Part of Transmit Dist. Matrix DT(1,2):"
#define DT21_R "Real Part of Transmit Dist. Matrix DT(2,1):"
#define DT21_I "Imag Part of Transmit Dist. Matrix DT(2,1):"
#define DT22_R "Real Part of Transmit Dist. Matrix DT(2,2):"
#define DT22_I "Imag Part of Transmit Dist. Matrix DT(2,2):"
#define DR11_R "Real Part of Receive Dist. Matrix DR(1,1):"
#define DR11_I "Imag Part of Receive Dist. Matrix DR(1,1):"
#define DR12_R "Real Part of Receive Dist. Matrix DR(1,2):"
#define DR12_I "Imag Part of Receive Dist. Matrix DR(1,2):"
#define DR21_R "Real Part of Receive Dist. Matrix DR(2,1):"
#define DR21_I "Imag Part of Receive Dist. Matrix DR(2,1):"
#define DR22_R "Real Part of Receive Dist. Matrix DR(2,2):"
#define DR22_I "Imag Part of Receive Dist. Matrix DR(2,2):"
/* SAR Leader: Data Quality Summary Headers */
#define BAND_POL "SAR Frequency / Polarisation :"
#define CAL_DATE "Nearest Calibration Update (YYMMDD):"
#define ISLR "Two-Dimensional ISLR (dB):"
#define PSLR "Two-Dimensional PSLR (dB):"
#define AZ_AMB "Nominal Azimuth Ambiguity (dB):"
#define RG_AMB "Nominal Range Ambiguity (dB):"
#define SNR_EST "SNR Estimate (from range spectra):"
#define BER "Bit Error Rate Estimate:"
#define SLANT_RES "Nominal Slant Range Resolution (m):"
#define RADIO_RES "Nominal Radiometric Resolution (dB):"
#define DYNAMIC "Instantaneous Dynamic Range (dB):"
#define ABS_RAD_UNC "Abs. Radiometric Calibration Unc (dB):"
#define PHA_RAD_UNC "Phase Radiometric Calibration Unc (deg):"
#define REL_RAD_UNC "Relative Radio. Calib. Unc Channel #"
#define REL_PHA_UNC "Relative Phase Calib. Unc Channel #"
#define ALOC_E "Abs. Location Error Along Track (m):"
#define XLOC_E "Abs. Location Error Cross Track (m):"
#define ASCALE_E "Geometric Scale Error Along Track:"
#define XSCALE_E "Geometric Scale Error Cross Track:"
#define A_TRACK_MIS "Along Track Rel. Mis. Err. Channel #"
#define X_TRACK_MIS "Across Track Rel. Mis. Err. Channel #"
#define SKEW_E "Nominal Geometric Skew Error:"
#define ORIENT_E "Scene Orientation Error (deg):"
/* SAR Leader: Facility Data Record 11 Headers */
#define COEFF_MAP "Map Projection Coefficient "
#define CALIB_INDIC "Calibration Indicator:"
#define START_UP "Calib. Start Line Upper Image:"
#define STOP_UP "Calib. Stop Line Upper Image:"
#define START_BO "Calib. Start Line Bottom Image:"
#define STOP_BO "Calib. Stop Line Bottom Image:"
#define PRF_IND "PRF Switching Indicator:"
#define PRF_LIN "PRF Switching Line Indicator:"
#define SAR_PROC "SAR Processing Start Line Number:"
#define LOSS_LINE "Number of Loss Lines:"
#define LOSS_LINE_RG "Number of Loss Range Lines:"
/* Imagery Options File: File Descriptor Record Headers */
#define N_SAR_RECS "SAR Data Record Count:"
#define SAR_REC_LEN "SAR Record Length (Bytes):"
#define BITS_SPAMP "Bits Per Sample/Pixel (RSD & MLD Only):"
#define PIX_GP "Pixels Per Data Group:"
#define BYTES_GP "Bytes Per Data Group:"
#define N_SAR_CHAN "Number of SAR Polarization Channels:"
#define N_LINES_IMG "Number of Image Lines this Channel:"
#define LEFT_BD_PIX "Left Border Pixels per Line:"
#define N_PIX_LINE "Samples/Pixels/Data Groups per Line:"
#define RIGHT_BD_PIX "Right Border Pixels per Line:"
#define TOP_LINES "Top Border Scan Lines:"
#define BOTTOM_LINES "Bottom Border Scan Lines:"
#define INTERLEAVE "Interleaving Indicator:"
#define RECS_LINE "Physical Records Per Line:"
#define RECS_CHAN "Physical Records Per Multi-Channel Line:"
#define LINE_PREFIX "Length of Prefix Data per Line (Bytes):"
#define BYTES_LINE "Bytes of Sample/Image Data per Line:"
#define LINE_SUFFIX "Length of Suffix Data per Line (Bytes):"
#define PREFIX_FLAG "Prefix / Suffix Repeat Flag:"
#define LINE_LOC "Sample Data Line Number Locator:"
#define SAR_LOC "SAR Channel Number Locator:"
#define TIME_LOC "Time of SAR Data Line Locator:"
#define LEFT_LOC "Left-fill Count Locator:"
#define RIGHT_LOC "Right-fill Count Locator:"
#define PAD_PIX "Pad Pixels Present Indicator:"
#define DATA_LOC "SAR Data Line Quality Code Locator:"
#define CALIB_LOC "Calibration Information Field Vector:"
#define GAIN_LOC "Gain Values Field Vector:"
#define BIAS_LOC "Bias Values Field Locator:"
#define SAR_FORMAT "SAR Data Format Indicator:"
#define SAR_CODE "SAR Data Format Code:"
#define LT_PIX_FILL "Left Fill Bits within Pixel:"
#define RT_PIX_FILL "Right Fill Bits within Pixel:"
#define MAX_RANGE "Maximum Data Range of Pixel:"
/* Imagery Options File: Signal Data Record Headers */
#define SAR_LINE "SAR Image Data Line Number:"
#define SAR_INDEX "SAR Image Data Record Index:"
#define LEFT_PIX "Actual Count of Left-Fill Pixels:"
#define DATA_PIX "Actual Count of Data Pixels:"
#define RIGHT_PIX "Actual Count of Right-Fill Pixels:"
#define SENSOR_FLAG "Sensor Parameters Update Flag:"
#define SENSOR_YEAR "Sensor Acquisition Year:"
#define SENSOR_DAY "Sensor Acquisition Day of the Year:"
#define SENSOR_MS "Sensor Acquisition Milliseconds of the Day:"
#define SAR_CHANNEL "SAR Channel Indicator:"
#define SAR_CODE_I "SAR Channel Code:"
#define T_POL "Transmit Polarization:"
#define R_POL "Receive Polarization:"
#define PRF_I "PRF (mHz) :"
#define SCAN_ID "Scan-Id for Scan Mode:"
#define RANGE_FLAG "Onboard Range Compressed Flag:"
#define CHIRP_DES "Chirp Type Designator:"
#define CHIRP_LEN "Chirp Length (ms):"
#define CHIRP_COEFF1 "Chirp Constant Coefficient (Hz):"
#define CHIRP_COEFF2 "Chirp Linear Coefficient (Hz/micro-s):"
#define CHIRP_COEFF3 "Chirp Quadratic Coefficient (Hz/micro-s^2):"
#define GAIN_I "Receiver Gain (dB) :"
#define LINE_FLAG "Nought Line Flag:"
#define ANT_SQUINT1 "Antenna Squint Angle (millionths of deg):"
#define ANT_ELEV1 "Antenna Elevation Angle (millionths of deg):"
#define ANT_SQUINT2 "Antenna Squint Angle (millionths of deg):"
#define ANT_ELEV2 "Antenna Elevation Angle (millionths of deg):"
#define SLANT_DATA "Slant Range to 1st Data Sample (m):"
#define DATA_WIND "Data Record Window (ns):"
#define PLATF_POS "Platform Position Parameters Update Flag:"
#define PLATF_LAT "Platform Latitude (millionths of deg):"
#define PLATF_LON "Platform Longitude (millionths of deg):"
#define PLATF_ALT "Platform Altitude (m):"
#define PLATF_SPEED "Platform Ground Speed (cm/s):"
#define PLATF_VELX "Platform Velocity X (cm/s):"
#define PLATF_VELY "Platform Velocity Y (cm/s):"
#define PLATF_VELZ "Platform Velocity Z (cm/s):"
#define PLATF_ACCX "Platform Acceleration X (cm/s^2):"
#define PLATF_ACCY "Platform Acceleration Y (cm/s^2):"
#define PLATF_ACCZ "Platform Acceleration Z (cm/s^2):"
#define PLATF_TRACK1 "Platform Track Angle (millionths of deg):"
#define PLATF_TRACK2 "Platform Track Angle (millionths of deg):"
#define PLATF_PITCH "Platform Pitch Angle (millionths of deg):"
#define PLATF_ROLL "Platform Roll Angle (millionths of deg):"
#define PLATF_YAW "Platform Yaw Angle (millionths of deg):"
#define COUNTER "Counter of PALSAR Frame:"
#define AUX_DATA "PALSAR Auxiliary Data:"
/* Imagery Options File: Processed Data Record Headers */
#define SLANT_1ST "Slant Range to 1st Pixel:"
#define SLANT_MID "Slant Range to Mid Pixel:"
#define SLANT_LST "Slant Range to Last Pixel:"
#define DOPPLER_1ST "Doppler Centroid Value at 1st Pixel:"
#define DOPPLER_MID "Doppler Centroid Value at Mid Pixel:"
#define DOPPLER_LST "Doppler Centroid Value at Last Pixel:"
#define AZ_FM_1ST "Azimuth FM Rate of 1st Pixel:"
#define AZ_FM_MID "Azimuth FM Rate of Mid Pixel:"
#define AZ_FM_LST "Azimuth FM Rate of Last Pixel:"
#define LOOK_ANGLE "Look Angle of Nadir (millionths of deg):"
#define AZ_SQUINT "Azimuth Squint ANgle (millionths of deg):"
#define GEO_REF "Geographic Ref. Parameter Update Flag:"
#define LAT_1ST "Latitude of 1st Pixel:"
#define LAT_MID "Latitude of Mid Pixel:"
#define LAT_LST "Latitude of Last Pixel:"
#define LON_1ST "Longitude of 1st Pixel:"
#define LON_MID "Longitude of Mid Pixel:"
#define LON_LST "Longitude of Last Pixel:"
#define NORTHING_1ST "Northing of 1st Pixel:"
#define NORTHING_LST "Northing of Last Pixel:"
#define EASTING_1ST "Easting of 1st Pixel:"
#define EASTING_LST "Easting of Last Pixel:"
#define LINE_HEADING "Line Heading:"
/* Trailer File: File Descriptor Record Headers */
#define LOW_RECS "Number of Low Res. Img Data Records:"
#define LOW_LEN "Low Res. Img Data Record Length:"
#define LOW_PIX "Number of Pixels of Low Res. Img Data:"
#define LOW_LINES "Number of Lines of Low Res. Img Data:"
#define LOW_BYTES "Number of Bytes per Sample:"
#endif /* ALOS_CEOS_RD_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
/*******************************************************************
File : graphics.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Version : 1.0
Creation : 09/2004
Update :
*-------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------
Description : GRAPHICS Routines
*-------------------------------------------------------------------
Routines :
void header(int nlig,int ncol,float Max,float Min,FILE *fbmp);
void headerTiff(int nlig,int ncol,FILE *fbmp);
void footerTiff(short int nlig, short int ncol, FILE * fptr);
void colormap(int *red,int *green,int *blue,int comp);
void bmp_8bit(int nlig,int ncol,float Max,float Min,char *Colormap,float **DataBmp,char *name);
void bmp_8bit_char(int nlig,int ncol,float Max,float Min,char *Colormap,char *DataBmp,char *name);
void bmp_24bit(int nlig,int ncol,int mapgray,float **DataBmp,char *name);
void tiff_24bit(int nlig,int ncol,int mapgray,float **DataBmp,char *name);
void bmp_training_set(float **mat,int li,int co,char *nom,char *ColorMap16);
void bmp_wishart(float **mat,int li,int co,char *nom,char *ColorMap);
void bmp_h_alpha(float **mat, int li, int co, char *name, char *ColorMap);
void LoadColormap(int *red, int *green, int *blue, char *ColorMap);
void write_header_bmp_8bit(int nlig, int ncol, float Max, float Min, char *ColorMap, FILE *fbmp);
void write_header_bmp_8bit_mask(int nlig, int ncol, float Max, float Min, char *ColorMap, char *MaskCol, FILE *fbmp);
void write_header_bmp_24bit(int nlig, int ncol, FILE *fbmp);
*******************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagGraphics
#define FlagGraphics
void header (int nlig, int ncol, float Max, float Min, FILE * fbmp);
void headerTiff (int nlig, int ncol, FILE * fbmp);
void footerTiff(short int nlig, short int ncol, FILE * fptr);
void colormap (int *red, int *green, int *blue, int comp);
void bmp_8bit (int nlig, int ncol, float Max, float Min, char *Colormap, float **DataBmp, char *name);
void bmp_8bit_char (int nlig, int ncol, float Max, float Min, char *Colormap, char *DataBmp, char *name);
void bmp_24bit(int nlig,int ncol,int mapgray,float **DataBmp,char *name);
void tiff_24bit(int nlig,int ncol,int mapgray,float **DataBmp,char *name);
void bmp_training_set (float **mat, int li, int co, char *nom, char *ColorMap16);
void bmp_wishart (float **mat, int li, int co, char *nom, char *ColorMap);
void bmp_h_alpha(float **mat, int li, int co, char *name, char *ColorMap);
void LoadColormap(int *red, int *green, int *blue, char *ColorMap);
void write_header_bmp_8bit(int nlig, int ncol, float Max, float Min, char *ColorMap, FILE *fbmp);
void write_header_bmp_8bit_mask(int nlig, int ncol, float Max, float Min, char *ColorMap, char *MaskCol, FILE *fbmp);
void write_header_bmp_24bit(int nlig, int ncol, FILE *fbmp);
#endif

View File

@ -0,0 +1,153 @@
/*******************************************************************************
File : idan.h
Project : ESA_POLSARPRO
Authors : Gabriel VALISE, Emmanuel TROUVE
Version : 1.0
Creation : 02/2007
Update :
*-------------------------------------------------------------------------------
GIPSA-Campus
ENSIEG, Domaine Universitaire
961 rue de Houille Blanche - BP46
38402 SAINT MARTIN D'HERES
Tel :(+33) 4 76 82 71 39
Fax :(+33) 4 76 82 63 84
e-mail : gabriel.vasile@lis.inpg.fr, emmanuel.trouve@lis.inpg.fr
*-------------------------------------------------------------------------------
Description : IDAN (Intensity Driven Adaptive Neighbourhood) Routines
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef IDAN_H
#define IDAN_H
typedef unsigned char pixu1;
typedef struct{
FILE *dffi; /* descripteur fichier image */
char nom[200]; /* nom du fichier, sans suffix */
char ext[10];
} write_imabin_t;
typedef struct{
char nom[200]; /* nom du fichier, sans suffix */
char ext[10];
}read_imabin_t;
/* image float */
typedef float pixfl;
struct imagefl {
pixfl **p;
int nc; /* nbr of columns */
int nr; /* nbr of rows */
char nom[200]; /* name */
};
typedef struct imagefl imafl;
/* parametre */
struct parametre{
char qst[200]; /* question */
char rep[200]; /* reponse */
struct parametre *next;
};
typedef struct parametre param;
/* structure for the AN coordinates */
typedef struct {int m,n;} COORD;
typedef struct{
/* parameters for the region growing */
double speckle_std;
int MAX_REGION_SIZE, filt_amount;
/* buffers for the region growing */
unsigned int *map,**Pmap;
unsigned int region_count, background_count;
COORD *region, *background;
int laba;
unsigned int label;
} IDAN_t;
/* debut/fin de programme */
int param_debut(int argc, char **argv, param *ptp);
int param_fin(int argc, char **argv, param *ptp);
/* lecture de parametre */
void lec_param(char *chaine, param *ptp);
int flec_param(FILE *fp, param *ptp);
void alloc_param(param *ptp);
void lec_int(int *pt_i, char *chaine);
void lec_float(float *pt_f, char *chaine);
void lec_double(double *pt_d, char *chaine);
void lec_nom(char *pt_nom, char *chaine);
int nom_image_suivante( char *nom0, char *nomres);
int free_imafl(imafl *im);
int alloc_imafl(imafl *im);
int read_imabin_init(read_imabin_t *des, imafl *im, int NC, int NL);
int write_imabin_init(write_imabin_t *de);
int write_imabin_ferm(write_imabin_t *des, imafl im, int OR, int OC, int NRF, int NCF);
/* functions for the IDAN computation */
double EstimateLocalMean_anf_int(IDAN_t *des, imafl image, int im, int jm, int iM, int jM);
void GrowRegion_anf_int(IDAN_t *des, int m, int n, double *PmH1, double *PmV1, double *PmX1, imafl rT11, imafl rT22, imafl rT33);
void ReviseRegion_anf_int(IDAN_t *des, double maH1, double maV1, double maX1, imafl rT11, imafl rT22, imafl rT33);
int ComputeFilteredMeasures_anf_int(IDAN_t *des , int ii, int jj, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT13_re, imafl rT13_im, imafl rT22, imafl rT23_re, imafl rT23_im, imafl rT33, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT13_re, imafl *wT13_im, imafl *wT22, imafl *wT23_re, imafl *wT23_im, imafl *wT33);
/* external functions */
double ABS(double a);
char *Calloc(unsigned, unsigned);
/* IDAN functions */
param *IDAN_lect(IDAN_t *des, param *ptp, char *debq);
int IDAN_init(IDAN_t *des, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT13_re, imafl rT13_im, imafl rT22, imafl rT23_re, imafl rT23_im, imafl rT33, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT13_re, imafl *wT13_im, imafl *wT22, imafl *wT23_re, imafl *wT23_im, imafl *wT33);
int IDAN_calc(IDAN_t *des, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT13_re, imafl rT13_im, imafl rT22, imafl rT23_re, imafl rT23_im, imafl rT33, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT13_re, imafl *wT13_im, imafl *wT22, imafl *wT23_re, imafl *wT23_im, imafl *wT33);
/* NEW ROUTINE ADDED BY POLSARPRO */
int convert_S2_T3(imafl rs11, imafl rs12, imafl rs21, imafl rs22, imafl *rT11, imafl *rT12_re, imafl *rT12_im, imafl *rT13_re, imafl *rT13_im, imafl *rT22, imafl *rT23_re, imafl *rT23_im, imafl *rT33, int NC, int NR);
/* NEW ROUTINE ADDED BY POLSARPRO */
int convert_S2_T4(imafl rs11, imafl rs12, imafl rs21, imafl rs22, imafl *rT11, imafl *rT12_re, imafl *rT12_im, imafl *rT13_re, imafl *rT13_im, imafl *rT14_re, imafl *rT14_im, imafl *rT22, imafl *rT23_re, imafl *rT23_im, imafl *rT24_re, imafl *rT24_im, imafl *rT33, imafl *rT34_re, imafl *rT34_im, imafl *rT44, int NC, int NR);
/* NEW ROUTINE ADDED BY POLSARPRO */
int convert_SPP_C2(imafl rs11, imafl rs12, imafl *rT11, imafl *rT12_re, imafl *rT12_im, imafl *rT22, int NC, int NR);
/* NEW ROUTINE ADDED BY POLSARPRO */
int convert_S2_C3(imafl rs11, imafl rs12, imafl rs21, imafl rs22, imafl *rT11, imafl *rT12_re, imafl *rT12_im, imafl *rT13_re, imafl *rT13_im, imafl *rT22, imafl *rT23_re, imafl *rT23_im, imafl *rT33, int NC, int NR);
/* NEW ROUTINE ADDED BY POLSARPRO */
int convert_S2_C4(imafl rs11, imafl rs12, imafl rs21, imafl rs22, imafl *rT11, imafl *rT12_re, imafl *rT12_im, imafl *rT13_re, imafl *rT13_im, imafl *rT14_re, imafl *rT14_im, imafl *rT22, imafl *rT23_re, imafl *rT23_im, imafl *rT24_re, imafl *rT24_im, imafl *rT33, imafl *rT34_re, imafl *rT34_im, imafl *rT44, int NC, int NR);
/* NEW IDAN functions ADDED BY POLSARPRO */
int IDAN_init2(IDAN_t *des, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT22, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT22);
int IDAN_calc2(IDAN_t *des, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT22, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT22);
void GrowRegion_anf_int2(IDAN_t *des, int m, int n, double *PmH1, double *PmV1, imafl rT11, imafl rT22);
void ReviseRegion_anf_int2(IDAN_t *des, double maH1, double maV1, imafl rT11, imafl rT22);
int ComputeFilteredMeasures_anf_int2(IDAN_t *des , int ii, int jj, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT22, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT22);
int IDAN_init4(IDAN_t *des, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT13_re, imafl rT13_im, imafl rT14_re, imafl rT14_im, imafl rT22, imafl rT23_re, imafl rT23_im, imafl rT24_re, imafl rT24_im, imafl rT33, imafl rT34_re, imafl rT34_im, imafl rT44, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT13_re, imafl *wT13_im, imafl *wT14_re, imafl *wT14_im, imafl *wT22, imafl *wT23_re, imafl *wT23_im, imafl *wT24_re, imafl *wT24_im, imafl *wT33, imafl *wT34_re, imafl *wT34_im, imafl *wT44);
int IDAN_calc4(IDAN_t *des, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT13_re, imafl rT13_im, imafl rT14_re, imafl rT14_im, imafl rT22, imafl rT23_re, imafl rT23_im, imafl rT24_re, imafl rT24_im, imafl rT33, imafl rT34_re, imafl rT34_im, imafl rT44, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT13_re, imafl *wT13_im, imafl *wT14_re, imafl *wT14_im, imafl *wT22, imafl *wT23_re, imafl *wT23_im, imafl *wT24_re, imafl *wT24_im, imafl *wT33, imafl *wT34_re, imafl *wT34_im, imafl *wT44);
void GrowRegion_anf_int4(IDAN_t *des, int m, int n, double *PmH1, double *PmV1, double *PmX1, double *PmY1, imafl rT11, imafl rT22, imafl rT33, imafl rT44);
void ReviseRegion_anf_int4(IDAN_t *des, double maH1, double maV1, double maX1, double maY1, imafl rT11, imafl rT22, imafl rT33, imafl rT44);
int ComputeFilteredMeasures_anf_int4(IDAN_t *des , int ii, int jj, imafl rT11, imafl rT12_re, imafl rT12_im, imafl rT13_re, imafl rT13_im, imafl rT14_re, imafl rT14_im, imafl rT22, imafl rT23_re, imafl rT23_im, imafl rT24_re, imafl rT24_im, imafl rT33, imafl rT34_re, imafl rT34_im, imafl rT44, imafl *wT11, imafl *wT12_re, imafl *wT12_im, imafl *wT13_re, imafl *wT13_im, imafl *wT14_re, imafl *wT14_im, imafl *wT22, imafl *wT23_re, imafl *wT23_im, imafl *wT24_re, imafl *wT24_im, imafl *wT33, imafl *wT34_re, imafl *wT34_im, imafl *wT44);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,908 @@
/*******************************************************************************
PolSARpro v5.0 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 (1991) of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details.
********************************************************************************
File : matrix.c
Project : ESA_POLSARPRO
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Version : 1.0
Creation : 09/2003
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : MATRICES Routines
*-------------------------------------------------------------------------------
Routines :
char *vector_char(int nrh);
void free_vector_char(char *v);
short int *vector_short_int(int nrh);
void free_vector_short_int(int *m);
int *vector_int(int nrh);
void free_vector_int(int *m);
float *vector_float(int nrh);
void free_vector_float(float *m);
double *vector_double_float(int nrh);
void free_vector_double_float(double *m);
char **matrix_char(int nrh,int nch);
void free_matrix_char(char **m,int nrh);
short int **matrix_short_int (int nrh, int nch);
void free_matrix_short_int (short int **m, int nrh);
int **matrix_int (int nrh, int nch);
void free_matrix_int (int **m, int nrh);
float **matrix_float(int nrh,int nch);
void free_matrix_float(float **m,int nrh);
short int ***matrix3d_short_int(int nz,int nrh,int nch)
void free_matrix3d_short_int(short int ***m,int nz,int nrh)
int ***matrix3d_int(int nz,int nrh,int nch)
void free_matrix3d_int(int ***m,int nz,int nrh)
float ***matrix3d_float(int nz,int nrh,int nch)
void free_matrix3d_float(float ***m,int nz,int nrh)
double **matrix_double_float (int nrh, int nch);
void free_matrix_double_float (double **m, int nrh);
cplx *cplx_vector(int nh)
cplx **cplx_matrix(int nrh,int nch)
cplx ***cplx_matrix3d(int nz,int nrh,int nch)
void cplx_free_matrix( cplx **m,int nrh)
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#include "PolSARproLib.h"
/*******************************************************************************
Routine : vector_char
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a vector of char elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of char
Returned values :
m : vector pointer (char *)
*******************************************************************************/
char *vector_char(int nrh)
{
char *v;
v = (char *) malloc((unsigned) (nrh + 1) * sizeof(char));
if (!v)
edit_error("allocation failure in vector_char()", "");
return v;
}
/*******************************************************************************
Routine : free_vector_char
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a vector and disallocates memory for a vector
of char elements
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void free_vector_char(char *v)
{
free((char *) v);
v = NULL;
}
/*******************************************************************************
Routine : vector_short_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a vector of short int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of short int
Returned values :
m : vector pointer (float *)
*******************************************************************************/
short int *vector_short_int(int nrh)
{
int ii;
short int *m;
m = (short int *) malloc((unsigned) (nrh + 1) * sizeof(short int));
if (!m)
edit_error("allocation failure 1 in vector_short_int()", "");
for (ii = 0; ii < nrh; ii++)
m[ii] = 0;
return m;
}
/*******************************************************************************
Routine : free_vector_short_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a vector and disallocates memory for a vector
of short int elements
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void free_vector_short_int(short int *m)
{
free((short int *) m);
m = NULL;
}
/*******************************************************************************
Routine : vector_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a vector of int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of int
Returned values :
m : vector pointer (float *)
*******************************************************************************/
int *vector_int(int nrh)
{
int ii;
int *m;
m = (int *) malloc((unsigned) (nrh + 1) * sizeof(int));
if (!m)
edit_error("allocation failure 1 in vector_int()", "");
for (ii = 0; ii < nrh; ii++)
m[ii] = 0;
return m;
}
/*******************************************************************************
Routine : free_vector_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a vector and disallocates memory for a vector
of int elements
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void free_vector_int(int *m)
{
free((int *) m);
m = NULL;
}
/*******************************************************************************
Routine : vector_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a vector of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of float
Returned values :
m : vector pointer (float *)
*******************************************************************************/
float *vector_float(int nrh)
{
int ii;
float *m;
m = (float *) malloc((unsigned) (nrh + 1) * sizeof(float));
if (!m)
edit_error("allocation failure 1 in vector_float()", "");
for (ii = 0; ii < nrh; ii++)
m[ii] = 0.;
return m;
}
/*******************************************************************************
Routine : free_vector_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a vector and disallocates memory for a vector
of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void free_vector_float(float *m)
{
free((float *) m);
m = NULL;
}
/*******************************************************************************
Routine : vector_double_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a vector of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of float
Returned values :
m : vector pointer (float *)
*******************************************************************************/
double *vector_double_float(int nrh)
{
int ii;
double *m;
m = (double *) malloc((unsigned) (nrh + 1) * sizeof(double));
if (!m)
edit_error("allocation failure 1 in vector_float()", "");
for (ii = 0; ii < nrh; ii++)
m[ii] = 0.;
return m;
}
/*******************************************************************************
Routine : free_vector_double_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a vector and disallocates memory for a vector
of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void free_vector_double_float(double *m)
{
free((double *) m);
m = NULL;
}
/*******************************************************************************
Routine : matrix_char
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of char elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
nch : number of rows
Returned values :
m : matrix pointer (char **)
*******************************************************************************/
char **matrix_char(int nrh, int nch)
{
int i;
char **m;
m = (char **) malloc((unsigned) (nrh + 1) * sizeof(char *));
if (!m)
edit_error("allocation failure 1 in matrix_char()", "");
for (i = 0; i < nrh; i++) {
m[i] = (char *) malloc((unsigned) (nch + 1) * sizeof(char));
if (!m[i])
edit_error("allocation failure 2 in matrix_char()", "");
}
return m;
}
/*******************************************************************************
Routine : free_matrix_char
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 2D matrix of char elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
Returned values :
void
*******************************************************************************/
void free_matrix_char(char **m, int nrh)
{
int i;
for (i = nrh - 1; i >= 0; i--) free((char *) (m[i]));
free((char **) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix_short_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of short int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
nch : number of rows
Returned values :
m : matrix pointer (short int **)
*******************************************************************************/
short int **matrix_short_int(int nrh, int nch)
{
int i, j;
short int **m;
m = (short int **) malloc((unsigned) (nrh) * sizeof(short int *));
if (!m)
edit_error("allocation failure 1 in matrix()", "");
for (i = 0; i < nrh; i++) {
m[i] = (short int *) malloc((unsigned) (nch) * sizeof(short int));
if (!m[i])
edit_error("allocation failure 2 in matrix()", "");
}
for (i = 0; i < nrh; i++)
for (j = 0; j < nch; j++)
m[i][j] = 0;
return m;
}
/*******************************************************************************
Routine : free_matrix_short_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2005
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 2D matrix of short int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
Returned values :
void
*******************************************************************************/
void free_matrix_short_int(short int **m, int nrh)
{
int i;
for (i = nrh - 1; i >= 0; i--) free((short int *) (m[i]));
free((short int **) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
nch : number of rows
Returned values :
m : matrix pointer (short int **)
*******************************************************************************/
int **matrix_int(int nrh, int nch)
{
int i, j;
int **m;
m = (int **) malloc((unsigned) (nrh) * sizeof(int *));
if (!m)
edit_error("allocation failure 1 in matrix()", "");
for (i = 0; i < nrh; i++) {
m[i] = (int *) malloc((unsigned) (nch) * sizeof(int));
if (!m[i])
edit_error("allocation failure 2 in matrix()", "");
}
for (i = 0; i < nrh; i++)
for (j = 0; j < nch; j++)
m[i][j] = 0;
return m;
}
/*******************************************************************************
Routine : free_matrix_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2005
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 2D matrix of int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
Returned values :
void
*******************************************************************************/
void free_matrix_int(int **m, int nrh)
{
int i;
for (i = nrh - 1; i >= 0; i--) free((int *) (m[i]));
free((int **) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
nch : number of rows
Returned values :
m : matrix pointer (float **)
*******************************************************************************/
float **matrix_float(int nrh, int nch)
{
int i, j;
float **m;
m = (float **) malloc((unsigned) (nrh) * sizeof(float *));
if (!m)
edit_error("allocation failure 1 in matrix()", "");
for (i = 0; i < nrh; i++) {
m[i] = (float *) malloc((unsigned) (nch) * sizeof(float));
if (!m[i])
edit_error("allocation failure 2 in matrix()", "");
}
for (i = 0; i < nrh; i++)
for (j = 0; j < nch; j++)
m[i][j] = 0.;
return m;
}
/*******************************************************************************
Routine : free_matrix_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 2D matrix of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
Returned values :
void
*******************************************************************************/
void free_matrix_float(float **m, int nrh)
{
int i;
for (i = nrh - 1; i >= 0; i--) free((float *) (m[i]));
free((float **) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix3d_short_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 02/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 3D matrix of short int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nz : number of elements 1st dimension
nrh : number of elements 2nd dimension
nch : number of elements 3rd dimension
Returned values :
m : 3D matrix pointer (short int ***)
*******************************************************************************/
short int ***matrix3d_short_int(int nz, int nrh, int nch)
{
int ii, jj, dd;
short int ***m;
m = (short int ***) malloc((unsigned) (nz + 1) * sizeof(short int **));
if (m == NULL)
edit_error("D'ALLOCATION No.1 DANS MATRIX()", "");
for (jj = 0; jj < nz; jj++) {
m[jj] = (short int **) malloc((unsigned) (nrh + 1) * sizeof(short int *));
if (m[jj] == NULL)
edit_error("D'ALLOCATION No.2 DANS MATRIX()", "");
for (ii = 0; ii < nrh; ii++) {
m[jj][ii] =
(short int *) malloc((unsigned) (nch + 1) * sizeof(short int));
if (m[jj][ii] == NULL)
edit_error("D'ALLOCATION No.3 DANS MATRIX()", "");
}
}
for (dd = 0; dd < nz; dd++)
for (jj = 0; jj < nrh; jj++)
for (ii = 0; ii < nch; ii++)
m[dd][jj][ii] = 0;
return m;
}
/*******************************************************************************
Routine : free_matrix3d_short_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 02/2005
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 3D matrix of short int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nz : number of elements 1st dimension
nrh : number of elements 2nd dimension
Returned values :
void
*******************************************************************************/
void free_matrix3d_short_int(short int ***m, int nz, int nrh)
{
int ii, jj;
for (jj = nz - 1; jj >= 0; jj--) {
for (ii = nrh - 1; ii >= 0; ii--) free((short int *) (m[jj][ii]));
free((short int **) (m[jj]));
}
free((short int ***) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix3d_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 02/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 3D matrix of int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nz : number of elements 1st dimension
nrh : number of elements 2nd dimension
nch : number of elements 3rd dimension
Returned values :
m : 3D matrix pointer (short int ***)
*******************************************************************************/
int ***matrix3d_int(int nz, int nrh, int nch)
{
int ii, jj, dd;
int ***m;
m = (int ***) malloc((unsigned) (nz + 1) * sizeof(int **));
if (m == NULL)
edit_error("D'ALLOCATION No.1 DANS MATRIX()", "");
for (jj = 0; jj < nz; jj++) {
m[jj] = (int **) malloc((unsigned) (nrh + 1) * sizeof(int *));
if (m[jj] == NULL)
edit_error("D'ALLOCATION No.2 DANS MATRIX()", "");
for (ii = 0; ii < nrh; ii++) {
m[jj][ii] = (int *) malloc((unsigned) (nch + 1) * sizeof(int));
if (m[jj][ii] == NULL)
edit_error("D'ALLOCATION No.3 DANS MATRIX()", "");
}
}
for (dd = 0; dd < nz; dd++)
for (jj = 0; jj < nrh; jj++)
for (ii = 0; ii < nch; ii++)
m[dd][jj][ii] = 0;
return m;
}
/*******************************************************************************
Routine : free_matrix3d_int
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 02/2005
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 3D matrix of int elements
*-------------------------------------------------------------------------------
Inputs arguments :
nz : number of elements 1st dimension
nrh : number of elements 2nd dimension
Returned values :
void
*******************************************************************************/
void free_matrix3d_int(int ***m, int nz, int nrh)
{
int ii, jj;
for (jj = nz - 1; jj >= 0; jj--) {
for (ii = nrh - 1; ii >= 0; ii--) free((int *) (m[jj][ii]));
free((int **) (m[jj]));
}
free((int ***) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix3d_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 3D matrix of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nz : number of elements 1st dimension
nrh : number of elements 2nd dimension
nch : number of elements 3rd dimension
Returned values :
m : 3D matrix pointer (float ***)
*******************************************************************************/
float ***matrix3d_float(int nz, int nrh, int nch)
{
int ii, jj, dd;
float ***m;
m = (float ***) malloc((unsigned) (nz + 1) * sizeof(float **));
if (m == NULL)
edit_error("D'ALLOCATION No.1 DANS MATRIX()", "");
for (jj = 0; jj < nz; jj++) {
m[jj] = (float **) malloc((unsigned) (nrh + 1) * sizeof(float *));
if (m[jj] == NULL)
edit_error("D'ALLOCATION No.2 DANS MATRIX()", "");
for (ii = 0; ii < nrh; ii++) {
m[jj][ii] =
(float *) malloc((unsigned) (nch + 1) * sizeof(float));
if (m[jj][ii] == NULL)
edit_error("D'ALLOCATION No.3 DANS MATRIX()", "");
}
}
for (dd = 0; dd < nz; dd++)
for (jj = 0; jj < nrh; jj++)
for (ii = 0; ii < nch; ii++)
m[dd][jj][ii] = (0.);
return m;
}
/*******************************************************************************
Routine : free_matrix3d_float
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Creation : 01/2002
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 3D matrix of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nz : number of elements 1st dimension
nrh : number of elements 2nd dimension
Returned values :
void
*******************************************************************************/
void free_matrix3d_float(float ***m, int nz, int nrh)
{
int ii, jj;
for (jj = nz - 1; jj >= 0; jj--) {
for (ii = nrh - 1; ii >= 0; ii--) free((float *) (m[jj][ii]));
free((float **) (m[jj]));
}
free((float ***) (m));
m = NULL;
}
/*******************************************************************************
Routine : matrix_double_float
Authors : Eric POTTIER
Creation : 08/2014
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
nch : number of rows
Returned values :
m : matrix pointer (float **)
*******************************************************************************/
double **matrix_double_float(int nrh, int nch)
{
int i, j;
double **m;
m = (double **) malloc((unsigned) (nrh) * sizeof(double *));
if (!m)
edit_error("allocation failure 1 in matrix()", "");
for (i = 0; i < nrh; i++) {
m[i] = (double *) malloc((unsigned) (nch) * sizeof(double));
if (!m[i])
edit_error("allocation failure 2 in matrix()", "");
}
for (i = 0; i < nrh; i++)
for (j = 0; j < nch; j++)
m[i][j] = 0.;
return m;
}
/*******************************************************************************
Routine : free_matrix_double_float
Authors : Eric POTTIER
Creation : 08/2014
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 2D matrix of float elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of lines
Returned values :
void
*******************************************************************************/
void free_matrix_double_float(double **m, int nrh)
{
int i;
for (i = nrh - 1; i >= 0; i--) free((double *) (m[i]));
free((double **) (m));
m = NULL;
}
/*******************************************************************************
Routine : cplx_vector
Authors : Laurent FERRO-FAMIL
Creation : 08/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a vector of complex elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of float
Returned values :
m : vector pointer (cplx *)
*******************************************************************************/
cplx *cplx_vector(int nh)
{
int i;
cplx *v,cplx0;
v=( cplx *)malloc((unsigned) (nh+1)*sizeof( cplx));
if (!v)
edit_error("allocation failure 1 in cplx_vector()","");
cplx0.re=0;cplx0.im=0;
for(i=0;i<nh;i++) v[i]=cplx0;
return v;
}
/*******************************************************************************
Routine : cplx_matrix
Authors : Laurent FERRO-FAMIL
Creation : 08/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of complex elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of elements 1st dimension
nch : number of elements 2nd dimension
Returned values :
m : 2D matrix pointer (cplx **)
*******************************************************************************/
cplx **cplx_matrix(int nrh,int nch)
{
int i,j;
cplx **m,cplx0;
m=( cplx **) malloc((unsigned) (nrh+1)*sizeof( cplx*));
if (!m) edit_error("allocation failure 1 in cplx_matrix()","");
for(i=0;i<nrh;i++) {
m[i]=( cplx *) malloc((unsigned) (nch+1)*sizeof( cplx));
if (!m[i]) edit_error("allocation failure 2 in cplx_matrix()","");
}
cplx0.re=0;cplx0.im=0;
for(i=0;i<nrh;i++) for(j=0;j<nch;j++) m[i][j]=cplx0;
return m;
}
/*******************************************************************************
Routine : cplx_matrix3d
Authors : Laurent FERRO-FAMIL
Creation : 08/2005
Update :
*-------------------------------------------------------------------------------
Description : Creates and allocates memory for a 2D matrix of complex elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of elements 1st dimension
nch : number of elements 2nd dimension
Returned values :
m : 2D matrix pointer (cplx **)
*******************************************************************************/
cplx ***cplx_matrix3d(int nz,int nrh,int nch)
{
int ii,jj,dd;
cplx ***m,cplx0;
m=( cplx ***) malloc((unsigned) (nz+1)*sizeof( cplx**));
if (m==NULL) edit_error("allocation failure 1 in cplx_matrix3d()","");
for(jj=0;jj<nz;jj++) {
m[jj]=( cplx **) malloc((unsigned) (nrh+1)*sizeof( cplx*));
if (m[jj]==NULL) edit_error("allocation failure 2 in cplx_matrix3d()","");
for(ii=0;ii<nrh;ii++) {
m[jj][ii]=( cplx *) malloc((unsigned) (nch+1)*sizeof( cplx));
if (m[jj][ii]==NULL) edit_error("allocation failure 3 in cplx_matrix3d()","");
}
}
cplx0.re=0;cplx0.im=0;
for (dd=0; dd<nz; dd++) for (jj=0; jj<nrh; jj++) for (ii=0; ii<nch; ii++)
m[dd][jj][ii] = cplx0;
return m;
}
/*******************************************************************************
Routine : cplx_free_matrix
Authors : Laurent FERRO-FAMIL
Creation : 08/2005
Update :
*-------------------------------------------------------------------------------
Description : Erases a matrix and disallocates memory for a 2D matrix of complex elements
*-------------------------------------------------------------------------------
Inputs arguments :
nrh : number of elements 1st dimension
Returned values :
void
*******************************************************************************/
void cplx_free_matrix( cplx **m,int nrh)
{
int i;
for(i=nrh-1;i>=0;i--) free((char*) (m[i]));
free((cplx*)m);
}

View File

@ -0,0 +1,120 @@
/*******************************************************************************
File : matrix.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Version : 1.0
Creation : 09/2003
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : MATRICES Routines
*-------------------------------------------------------------------------------
Routines :
char *vector_char(int nrh);
void free_vector_char(char *v);
short int *vector_short_int(int nrh);
void free_vector_short_int(short int *m);
int *vector_int(int nrh);
void free_vector_int(int *m);
float *vector_float(int nrh);
void free_vector_float(float *m);
double *vector_double_float(int nrh);
void free_vector_double_float(double *m);
char **matrix_char(int nrh,int nch);
void free_matrix_char(char **m,int nrh);
short int **matrix_short_int(int nrh,int nch);
void free_matrix_short_int(short int **m,int nrh);
int **matrix_int(int nrh,int nch);
void free_matrix_int(int **m,int nrh);
float **matrix_float(int nrh,int nch);
void free_matrix_float(float **m,int nrh);
short int ***matrix3d_short_int(int nz,int nrh,int nch)
void free_matrix3d_short_int(short int ***m,int nz,int nrh)
int ***matrix3d_int(int nz,int nrh,int nch)
void free_matrix3d_int(int ***m,int nz,int nrh)
float ***matrix3d_float(int nz,int nrh,int nch)
void free_matrix3d_float(float ***m,int nz,int nrh)
cplx *cplx_vector(int nh)
cplx **cplx_matrix(int nrh,int nch)
cplx ***cplx_matrix3d(int nz,int nrh,int nch)
void cplx_free_matrix( cplx **m,int nrh)
double **matrix_double_float(int nrh,int nch);
void free_matrix_double_float(float **m,int nrh);
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagMatrix
#define FlagMatrix
#include "PolSARproLib.h"
char *vector_char (int nrh);
void free_vector_char (char *v);
short int *vector_short_int (int nrh);
void free_vector_short_int (short int *m);
int *vector_int (int nrh);
void free_vector_int (int *m);
float *vector_float (int nrh);
void free_vector_float (float *m);
double *vector_double_float (int nrh);
void free_vector_double_float (double *m);
char **matrix_char (int nrh, int nch);
void free_matrix_char (char **m, int nrh);
short int **matrix_short_int (int nrh, int nch);
void free_matrix_short_int (short int **m, int nrh);
int **matrix_int (int nrh, int nch);
void free_matrix_int (int **m, int nrh);
float **matrix_float (int nrh, int nch);
void free_matrix_float (float **m, int nrh);
short int ***matrix3d_short_int(int nz,int nrh,int nch);
void free_matrix3d_short_int(short int ***m,int nz,int nrh);
int ***matrix3d_int(int nz,int nrh,int nch);
void free_matrix3d_int(int ***m,int nz,int nrh);
float ***matrix3d_float (int nz, int nrh, int nch);
void free_matrix3d_float (float ***m, int nz, int nrh);
double **matrix_double_float (int nrh, int nch);
void free_matrix_double_float (double **m, int nrh);
cplx *cplx_vector(int nh);
cplx **cplx_matrix(int nrh,int nch);
cplx ***cplx_matrix3d(int nz,int nrh,int nch);
void cplx_free_matrix( cplx **m,int nrh);
#endif

View File

@ -0,0 +1,93 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#include "PolSARproLib.h"
int get_one_char_only(void)
{
int c, first;
/* get and save the first character */
first = c = getchar();
/* if it was not newline, keep getting more (but stop on EOF) */
while (c != '\n' && c != EOF)
c = getchar();
/* in any case, return the first one, which may be '\n' or EOF */
return first;
}
int get_commandline_prm(int argc, char *argv[], char *keyword, cmd_prm type, void *ptr, int required, char *usage)
{
int i, found=0,missing_prm=0,is_arg;
unsigned int loop,count;
for (i=1; (!found) && (i<argc); i++)
{
if(!strcmp(keyword,argv[i]))
{
found=1;
if(type != no_cmd_prm) /* a parameter is needed */
{
if(i < argc-1)
{
is_arg=1;
if(argv[i+1][0]=='-')
{
count=0;
is_arg=0;
if(strlen(argv[i+1])>1)
{
for(loop=1;loop<strlen(argv[i+1]);loop++)
{
count+=((argv[i+1][loop] >= '0') && (argv[i+1][loop] <= '9'));
count+=(argv[i+1][loop] == '.');
}
count++;
is_arg=(count==strlen(argv[i+1]));
}
}
if(is_arg) /* the next argument is a parameter */
{
switch(type)
{
case int_cmd_prm: sscanf(argv[i+1], "%d", (int *)ptr);break;
case flt_cmd_prm: sscanf(argv[i+1], "%f", (float *)ptr);break;
//case str_cmd_prm: sscanf(argv[i+1], "%s", (char *)ptr);break;
case str_cmd_prm: strcpy((char *)ptr, argv[i+1]);break;
default:
edit_error("Wrong parameter type","");
}
}
else
missing_prm=1;
}
else
missing_prm=1;
}
}
}
if(missing_prm)
{
printf("\n A parameter is needed for the %s option\n",keyword);
edit_error("Usage:\n",usage);
}
if(!found && required)
{
printf("\n The required argument %s could not be found\n",keyword);
edit_error("Usage:\n",usage);
}
return found;
}

View File

@ -0,0 +1,14 @@
#ifndef My_utils_flag
#define My_utils_flag
#define my_square(x) ((x)*(x))
#define my_max(a,b) ((a)>(b) ? (a):(b))
#define my_min(a,b) ((a)<(b) ? (a):(b))
#define my_wrap_int(a,b) (((a)>=0) ? ((a)%(int)(b)):((b)+((a)%(int)(b))))
/* a (integer) modulo b and wrapped */
typedef enum {no_cmd_prm,int_cmd_prm,flt_cmd_prm,str_cmd_prm} cmd_prm;
int get_commandline_prm(int argc, char *argv[], char *keyword, cmd_prm type, void *ptr, int required, char *usage);
int get_one_char_only(void);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,126 @@
/*******************************************************************************
File : processing.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Version : 1.0
Creation : 09/2003
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : PROCESSING Routines
*-------------------------------------------------------------------------------
Routines :
void ProductRealMatrix(float **M1, float **M2, float **M3, int N);
void InverseRealMatrix2(float **M, float **IM);
void InverseRealMatrix4(float **HM, float **IHM);
void ProductCmplxMatrix(float ***M1, float ***M2, float ***M3, int N);
void InverseCmplxMatrix2(float ***M, float ***IM);
void DeterminantCmplxMatrix2(float ***M, float *det);
void DeterminantCmplxMatrix3(float ***M, float *det);
void DeterminantCmplxMatrix4(float ***M, float *det);
void InverseHermitianMatrix2(float ***HM, float ***IHM);
float Trace2_HM1xHM2(float ***HM1, float ***HM2);
void ProductHermitianMatrix2(float ***HM1, float ***HM2, float ***HM3);
void DeterminantHermitianMatrix2(float ***HM, float *det);
void InverseHermitianMatrix3(float ***HM, float ***IHM);
float Trace3_HM1xHM2(float ***HM1, float ***HM2);
void DeterminantHermitianMatrix3(float ***HM, float *det);
void InverseHermitianMatrix4(float ***HM, float ***IHM);
void PseudoInverseHermitianMatrix4(float ***HM, float ***IHM);
float Trace4_HM1xHM2(float ***HM1, float ***HM2);
void DeterminantHermitianMatrix4(float ***HM, float *det);
void Fft(float *vect,int nb_pts,int inv);
void Diagonalisation(int MatrixDim, float ***HM, float ***EigenVect, float *EigenVal);
void MinMaxArray2D(float **mat,float *min,float *max,int nlig,int ncol);
void MinMaxContrastMedian(float *mat,float *min,float *max,int Npts);
float MinMaxContrastMedianArray(float array[], int npts);
void cplx_htransp_mat(cplx **mat,cplx **tmat,int nlig, int ncol);
void cplx_mul_mat(cplx **m1,cplx **m2,cplx **res,int nlig,int ncol);
void cplx_diag_mat2(cplx **T,cplx **V,float *L);
void cplx_diag_mat3(cplx **T,cplx **V,float *L);
void cplx_diag_mat6(cplx **T,cplx **V,float *L);
void cplx_inv_mat(cplx **mat,cplx **res);
void cplx_inv_mat2(cplx **mat,cplx **res);
float MedianArray(float array[], int n);
void cplx_mul_mat_val(cplx **m1,float value,cplx **res,int nlig,int ncol);
void cplx_mul_mat_cval(cplx **m1,cplx value,cplx **res,int nlig,int ncol);
void cplx_mul_mat_vect(cplx **m1,float *v2,cplx *res,int nlig,int ncol);
void cplx_mul_mat_cvect(cplx **m1,cplx *v2,cplx *res,int nlig,int ncol);
cplx cplx_quadratic_form(cplx **m1,cplx *v2,int nlig,int ncol)
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagProcessing
#define FlagProcessing
#include "PolSARproLib.h"
void ProductRealMatrix(float **M1, float **M2, float **M3, int N);
void InverseRealMatrix2(float **M, float **IM);
void InverseRealMatrix4(float **HM, float **IHM);
void ProductCmplxMatrix(float ***M1, float ***M2, float ***M3, int N);
void InverseCmplxMatrix2(float ***M, float ***IM);
void DeterminantCmplxMatrix2(float ***M, float *det);
void DeterminantCmplxMatrix3(float ***M, float *det);
void DeterminantCmplxMatrix4(float ***M, float *det);
void InverseHermitianMatrix2(float ***HM, float ***IHM);
float Trace2_HM1xHM2(float ***HM1, float ***HM2);
void ProductHermitianMatrix2(float ***HM1, float ***HM2, float ***HM3);
void DeterminantHermitianMatrix2(float ***HM, float *det);
void InverseHermitianMatrix3(float ***HM, float ***IHM);
float Trace3_HM1xHM2(float ***HM1, float ***HM2);
void DeterminantHermitianMatrix3(float ***HM, float *det);
void InverseHermitianMatrix4(float ***HM, float ***IHM);
void PseudoInverseHermitianMatrix4(float ***HM, float ***IHM);
float Trace4_HM1xHM2(float ***HM1, float ***HM2);
void DeterminantHermitianMatrix4(float ***HM, float *det);
void Fft(float *vect, int nb_pts, int inv);
void Diagonalisation(int MatrixDim, float ***HM, float ***EigenVect, float *EigenVal);
void MinMaxArray2D(float **mat,float *min,float *max,int nlig,int ncol);
void MinMaxContrastMedian(float *mat,float *min,float *max,int Npts);
float MinMaxContrastMedianArray(float array[], int npts);
void cplx_htransp_mat(cplx **mat,cplx **tmat,int nlig, int ncol);
void cplx_mul_mat(cplx **m1,cplx **m2,cplx **res,int nlig,int ncol);
void cplx_diag_mat2(cplx **T,cplx **V,float *L);
void cplx_diag_mat3(cplx **T,cplx **V,float *L);
void cplx_diag_mat6(cplx **T,cplx **V,float *L);
void cplx_inv_mat(cplx **mat,cplx **res);
void cplx_inv_mat2(cplx **mat,cplx **res);
#define ELEM_SWAP(a,b) { register float t=(a); (a)=(b); (b)=t; }
float MedianArray(float array[], int n);
void cplx_mul_mat_val(cplx **m1,float value,cplx **res,int nlig,int ncol);
void cplx_mul_mat_cval(cplx **m1,cplx value,cplx **res,int nlig,int ncol);
void cplx_mul_mat_vect(cplx **m1,float *v2,cplx *res,int nlig,int ncol);
void cplx_mul_mat_cvect(cplx **m1,cplx *v2,cplx *res,int nlig,int ncol);
cplx cplx_quadratic_form(cplx **m1,cplx *v2,int nlig,int ncol);
#endif

View File

@ -0,0 +1,42 @@
/* $Header: /cvsroot/gnustep/gnustep/dgs/tiff/tools/rasterfile.h,v 1.1.1.1 1996/09/11 22:14:41 netcrep Exp $ */
/*
* Description of header for files containing raster images
*/
struct rasterfile {
int ras_magic; /* magic number */
int ras_width; /* width (pixels) of image */
int ras_height; /* height (pixels) of image */
int ras_depth; /* depth (1, 8, or 24 bits) of pixel */
int ras_length; /* length (bytes) of image */
int ras_type; /* type of file; see RT_* below */
int ras_maptype; /* type of colormap; see RMT_* below */
int ras_maplength; /* length (bytes) of following map */
/* color map follows for ras_maplength bytes, followed by image */
};
#define RAS_MAGIC 0x59a66a95
/* Sun supported ras_type's */
#define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
#define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
#define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
#define RT_FORMAT_RGB 3
#define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
/* Sun registered ras_maptype's */
#define RMT_RAW 2
/* Sun supported ras_maptype's */
#define RMT_NONE 0 /* ras_maplength is expected to be 0 */
#define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
/*
* NOTES:
* Each line of the image is rounded out to a multiple of 16 bits.
* This corresponds to the rounding convention used by the memory pixrect
* package (/usr/include/pixrect/memvar.h) of the SunWindows system.
* The ras_encoding field (always set to 0 by Sun's supported software)
* was renamed to ras_length in release 2.0. As a result, rasterfiles
* of type 0 generated by the old software claim to have 0 length; for
* compatibility, code reading rasterfiles must be prepared to compute the
* true length from the width, height, and depth fields.
*/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,539 @@
/******************************************************************************
File : sirc_header.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Version : 1.0
Creation : 06/2006
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : SIR-C CEOS Header File
*******************************************************************************/
/*****************************************************************************/
/* */
/* Copyright (c) 1993, California Institute of Technology. U.S. */
/* Government Sponsorship under NASA Contract NAS7-918 is acknowledged. */
/* */
/* "This software is provided to you "as is" and without warranty of */
/* any kind, expressed or implied, including but not limited to, */
/* warranties of performance, merchantability, or fitness for a */
/* particular purpose. User bears all risk as to the quality and */
/* performance of the software." */
/* */
/*****************************************************************************/
/******************************************************************************
* *
* *
* Module: ceos_rd.h Program: SIR-C GDPS *
* Author: P. Barrett *
* Initiated: 11-FEB-93 *
* *
* --------------------------------------------------------------------------- *
* *
* Abstract: ceos_rd.c definitions *
* *
* Description: This file includes definitions and constants used by *
* ceos_rd.c *
* *
******************************************************************************/
#ifndef CEOS_RD_H
#define CEOS_RD_H
/* Miscellaneous */
#define SPACE '\040' /* ascii space character */
/******************************************************************************
* *
* Titles *
* *
******************************************************************************/
#define STARS1 "***************************************************"
#define STARS2 "* *"
#define DATAS1 " *** Data Set"
#define DATAS2 "***"
#define TABLE1 " *** Table Entry"
#define TABLE2 "***"
#define VOL_TITLE "* Volume Directory File:"
#define SARL_TITLE "* SAR Leader File:"
#define IMG_TITLE "* Imagery Options File:"
#define SART_TITLE "* SAR Trailer File:"
#define NULL_TITLE "* Null Volume Directory File:"
#define DESCR_REC "* File Descriptor Record"
#define PTR_REC_SARL "* File Pointer Record: SAR Leader"
#define PTR_REC_IMG "* File Pointer Record: Imagery Options"
#define PTR_REC_SART "* File Pointer Record: SAR Trailer"
#define TEXT "* Text Record"
#define DSS_REC "* Data Set Summary Record"
#define MAP_REC "* Map Projection Data Record"
#define PLATF_REC "* Platform Position Record"
#define ATT_REC "* Attitude Data Record"
#define RADIO_REC "* Radiometric Data Record"
#define RADIOC_REC "* Radiometric Compensation Record"
#define QUAL_REC "* Data Quality Summary Record"
#define HIST_REC "* Data Histograms Record"
#define SPECTRA_REC "* Range Spectra Record"
#define UPDATE_REC "* Radar Parameter Update Record"
#define DETAILED_REC "* Detailed Processing Parameter Record"
#define CALIB_REC "* Calibration Data Record"
/* strings */
#define HH_STR "HH"
#define HV_STR "HV"
#define VV_STR "VV"
#define VH_STR "VH"
/* constants */
/*#define MAX_MISSING_PAIRS 5*/ /* Max pairs of missing rg lines/chan */
#define NAME_LEN 128 /* short string length */
#define LONG_NAME_LEN 128 /* long string length */
#define MAX_POLS 4 /* max number of pols: HH, HV, VV, VH */
#define RSD 1 /* RSD image data type */
#define non_RSD 2 /* MLC, MLD, SLC image data type */
/* CEOS input filenames */
#define LDR_IN_FILE "pr%s_ldr_ceos"
#define IMG_IN_FILE "pr%s_img_ceos"
#define TLR_IN_FILE "pr%s_tlr_ceos"
/* CEOS output filenames */
#define LDR_OUT_FILE "pr%s_ldr_ceos_ascii"
#define IMG_OUT_FILE "pr%s_img_ceos_ascii"
#define TLR_OUT_FILE "pr%s_tlr_ceos_ascii"
#define IMG_DISP_FILE "pr%s_img_ceos_image"
#define RSD_DISP_FILE "pr%s_rsd_ceos_"
/******************************************************************************
* *
* Text Fields *
* *
******************************************************************************/
/* Common Header */
#define HDR_SEQ "Record Sequence Number:"
#define HDR_1SUB "First Record Subtype Code:"
#define HDR_TYPE "Record Type Code:"
#define HDR_2SUB "Second Record Subtype Code:"
#define HDR_3SUB "Third Record Subtype Code:"
#define HDR_LEN "Record Length:"
/* SAR Leader: File Descriptor Headers */
#define ASCII_FL "Data Format (A = ASCII):"
#define DOC_FORM "Format Control Document:"
#define FORM_REV "Format Control Document Version:"
#define REC_REV "Record Format Revision Level:"
#define FILE_NO "File Number:"
#define FILE_NAME "File Name:"
#define FSEQ "Record Sequence and Location Type Flag:"
#define LOC_NO "Sequence Number Location:"
#define SEQ_FLD_L "Sequence Number Field Length:"
#define LOC_TYPE "Record Code and Location Type Flag:"
#define RCODE_LOC "Record Code Location:"
#define RCODE_FLD_L "Record Code Field Length:"
#define FLGT "Record Length and Location Type Flag:"
#define REC_LEN_LOC "Record Length Location:"
#define REC_LEN_LEN "Record Length Field Length:"
#define DS_FILE "Number of Data Set Summary Records:"
#define RECORD_LEN "Record Length (bytes):"
#define MP_FILE "Number of Map Projection Records:"
#define PLATF_FILE "Number of Platform Position Records:"
#define ATT_FILE "Number of Attitude Records:"
#define RADIO_FILE "Number of Radiometric Data Records:"
#define RADIOC_FILE "Number of Radiometric Compensation Records:"
#define QUAL_FILE "Number of Data Quality Summary Records:"
#define HIST_FILE "Number of Data Histogram Records:"
#define SPEC_FILE "Number of Range Spectra Records:"
#define ELEV_FILE "Number of Digital Elevation Model Records:"
#define UPD_FILE "Number of Radar Parameter Update Records:"
#define ANNOT_FILE "Number of Annotation Data Records:"
#define PROC_FILE "Number of Detailed Processing Records:"
#define CAL_FILE "Number of Calibration Data Records:"
#define GROUND_FILE "Number of Ground Control Points Records:"
#define FAC_FILE "Number of Facility Data Records:"
/* SAR Leader: Data Set Summary Headers */
#define SEQ_NO "Sequence Number:"
#define SAR_CHAN "SAR Channel Indicator:"
#define SITE_ID "Site ID:"
#define SITE_NAME "Site Name:"
#define CTR_GMT "GMT, Image Center (YYYY/MM/DD hh:mm:ss.ttt):"
#define CTR_MET "MET, Image Center (DD hh:mm:ss.ttt):"
#define LAT_CTR "Geodetic Latitude at Image Center (deg):"
#define LONG_CTR "Geodetic Longitude at Image Center (deg):"
#define TRK_ANG_CTR "Track Angle at Image Center (deg):"
#define ELLIPSE_NAME "Ellipsoid Designator:"
#define MAJOR_AXIS "Ellipsoid Semimajor Axis (km):"
#define MINOR_AXIS "Ellipsoid Semiminor Axis (km):"
#define TERR_HT "Average Terrain Height above Ellipsoid (m):"
#define CTR_LINE "Image Center Line Number:"
#define CTR_PIX "Image Center Pixel Number:"
#define IMG_LEN "Image Length (km):"
#define IMG_WID "Image Width (km):"
#define N_CHAN "Number of SAR Polarization Channels:"
#define PLAT_ID "Sensor Platform Mission ID:"
#define SENSE_ID "Sensor ID:"
#define BAND " SAR Band:"
#define RESOL " Resolution (HI = 20 MHz, LO = 10 MHz):"
#define ACQ " Data Acquisition Mode (0 - 23):"
#define TX_POL " Transmit Polarization:"
#define RX_POL " Receive Polarization:"
#define DT_ID "Datatake ID:"
#define CRAFT_LAT "Platform Geodetic Latitude at Nadir (deg):"
#define CRAFT_LONG "Platform Geodetic Longitude at Nadir (deg):"
#define PLAT_HD "Platform Heading at Nadir (deg):"
#define CLOCK_ANG "Clock Angle (Left: -90, Right: +90) (deg):"
#define INC_ANGLE "Incidence Angle at Image Center (deg):"
#define FREQ "Radar Frequency (GHz):"
#define WAVE_LEN "Radar Wavelength (m):"
#define MOTION "Motion Compensation (00 = No Compensation):"
#define CD_SPEC "Range Pulse Code Specifier:"
#define CHIRP_FR "Range Chirp Start Frequency (MHz):"
#define CHIRP_RATE "Range Chirp Rate (MHz / microsec):"
#define RG_SAMPL "Range Complex Sampling Rate (MHz):"
#define ECHO_DLAY "One-Way Echo Delay Time (microsec):"
#define PULSE_LEN "Range Pulse Duration (microsec):"
#define BAND_CONV "Base Band Conversion ?:"
#define COMPR_FLAG "Range Compressed ?:"
#define LIKE_GAIN "Receiver Gain for Like Polarization (dB):"
#define CROSS_GAIN "Receiver Gain for Cross Polarization (dB):"
#define Q_BITS "Quantization in Bits per Channel:"
#define QUANT_DES "Quantization Descriptor:"
#define ELECT_BORE "Antenna Electronic Boresight (deg):"
#define MECH_BORE "Antenna Mechanical Boresight (deg):"
#define ECHO_TRK "Echo Tracking:"
#define PRF "Nominal PRF (Hz):"
#define RG_BEAMW "Antenna Elevation 6 dB Beamwidth (deg):"
#define AZ_BEAMW "Antenna Azimuth 6 dB Beamwidth (deg):"
#define HW_VERS "Hardware Version:"
#define SW_VERS "Software Version:"
#define JPL "Processing Facility:"
#define PROD_CODE "Product Level Code:"
#define PROD_TYPE "Product Type:"
#define PROC_ALG "Processing Algorithm:"
#define N_LOOKS "Total Number of Looks:"
#define AZ_BNDWTH "Total Processor Azimuth Bandwidth (Hz):"
#define RG_BNDWTH "Total Processor Range Bandwidth (MHz):"
#define AZ_WEIGHT "Azimuth Weighting Function:"
#define RG_WEIGHT "Range Weighting Function:"
#define HDDC "HDDC ID:"
#define RG_RES "Nominal Range Resolution (m):"
#define AZ_RES "Nominal Azimuth Resolution (m):"
#define GAIN "Processor Gain for Noise Data:"
#define BIAS "Linear Radiometric Conversion Factor:"
#define RG_TIME "Time Direction Indicator (Range):"
#define AZ_TIME "Time Direction Indicator (Azimuth):"
#define ELEC_DELAY "Electronic Delay (RSD only) (microsec):"
#define LINE_CON "Line Content:"
#define CLUTTER "Clutter Lock Applied ?"
#define AUTOFOCUS "Autofocussing Applied ?"
#define LINE_SP "Line Spacing (m):"
#define PIXEL_SP "Pixel Spacing (m):"
#define RG_COMPR "Processor Range Compression:"
#define ORBIT_DIR "Orbit Direction:"
#define N_ANNOT "Number of Annotation Points:"
/* SAR Leader: Map Projection Headers */
#define MP_DESCR "Map Projection Descriptor:"
#define N_PIXELS "Number of Pixels per Image Line:"
#define N_LINES "Number of Image Lines:"
#define PL_DIST "Platform Distance at Image Center (km):"
#define ALTITUDE "Geodetic Altitude of Platform (km):"
#define SPEED "Spacecraft Speed at Nadir (km/sec):"
#define NE_LAT "Near Range Early Time Latitude (deg):"
#define NE_LONG "Near Range Early Time Longitude (deg):"
#define FE_LAT "Far Range Early Time Latitude (deg):"
#define FE_LONG "Far Range Early Time Longitude (deg):"
#define FL_LAT "Far Range Late Time Latitude (deg):"
#define FL_LONG "Far Range Late Time Longitude (deg):"
#define NL_LAT "Near Range Late Time Latitude (deg):"
#define NL_LONG "Near Range Late Time Longitude (deg):"
/* SAR Leader: Platform Position Headers */
#define PLAT_YEAR "Year of First Point (YYYY):"
#define PLAT_MONTH "Month of First Point (MM):"
#define PLAT_DAY "Day of First Point (DD):"
#define PLAT_DIY "Day of Year of First Point:"
#define PLAT_SID "Seconds in Day of First Point:"
#define PLAT_INT "Time Between Points (s):"
#define PLAT_COORD "Reference Coordinate System:"
#define PLAT_HOUR "Mean Hour Angle (deg):"
#define PLAT_POSV "Position Vector (km):"
#define PLAT_VEL "Velocity Vector (km/sec):"
#define PLAT_XYZ " x y z"
/* SAR Leader: Attitude Data Headers */
#define ATT_DAYS "GMT Day of Year:"
#define ATT_SECS "GMT Millisecond of Day:"
#define ATT_PITCH "Pitch from PATH tape (deg):"
#define ATT_ROLL "Roll Angle from PATH tape (deg):"
#define ATT_YAW "Yaw from PATH tape (deg):"
/* SAR Leader: Radiometric Data Headers */
#define N_SETS "Number of Data Sets:"
#define DATA_ARRY_SZ "Size of Data Array (bytes):"
#define SET_SIZE "Data Set Size (bytes):"
#define BAND_POL "SAR Frequency/Polarization:"
#define N_SAMPLES "Number of Samples:"
#define SMPL_TYPE "Sample Type:"
#define NOISE_POW "Raw Noise Power Est. (data number units):"
#define LCF "Linear Conversion Factor:"
#define OCF "Processor Noise Gain for Noise Data:"
/* SAR Leader: Radiometric Compensation Data Headers */
#define RC_TBL_SZ "Size of Data Table (bytes):"
#define DESIGN "Compensation Data Type Designator:"
#define DESCRIPT "Compensation Data Descriptor:"
#define REQ_REC "No. of Records Required to Compensate Table:"
#define TABLE_SEQ "Sequence Number in Table:"
#define SUBSAMPLE "Data Subsampling Factor:"
#define COMP1 "Range Index, 1st Table Value:"
#define COMP_LAST "Range Index, Last Table Value:"
#define GROUP_SZ "Compensation Pixel Group Size:"
#define MIN_INDEX "Minimum Sample Index:"
#define MIN_COMP "Minimum Radiometric Compensation Value:"
#define MAX_INDEX "Maximum Sample Index:"
#define MAX_COMP "Maximum Radiometric Compensation Value:"
#define COMP_N_ENT "Number of Compensation Table Entries:"
#define SMPL_INDEX "Sample Index:"
#define SMPL_VALUE "Sample Value:"
/* SAR Leader: Data Quality Summary Headers */
#define CAL_DATE "Nearest Calibration Update (YYMMDD):"
#define ISLR "Two-Dimensional ISLR (dB):"
#define PSLR "Two-Dimensional PSLR (dB):"
#define AZ_AMB "Nominal Azimuth Ambiguity (dB):"
#define RG_AMB "Nominal Range Ambiguity (dB):"
#define SNR_EST "SNR Estimate (from range spectra):"
#define BER "Bit Error Rate Estimate:"
#define SLANT_RES "Nominal Slant Range Resolution (m):"
#define RADIO_RES "Nominal Radiometric Resolution (dB):"
#define DYNAMIC "Instantaneous Dynamic Range (dB):"
#define ABS_RAD_UNC "Abs. Radiometric Calibration Unc (dB):"
#define SHORT_UNC "Rel. Short-Term Uncertainty vs HH (dB):"
#define PHASE_UNC "Rel. Phase Calibration Unc vs HH (deg):"
#define LONG_UNC "Rel. Long-Term Calibr Unc vs HH (dB):"
#define SHORT_CL "Short-Term Freq-to-Freq Unc. CHH/LHH (dB):"
#define LONG_CL "Long-Term Freq-to-Freq Unc. CHH/LHH (dB):"
#define ALOC_E "Abs. Location Error Along Track (m):"
#define XLOC_E "Abs. Location Error Cross Track (m):"
#define ASCALE_E "Geometric Scale Error Along Track:"
#define XSCALE_E "Geometric Scale Error Cross Track:"
#define SKEW_E "Nominal Geometric Skew Error:"
#define ORIENT_E "Scene Orientation Error (deg):"
#define AREG_E "Along Track Registration Err vs HH (m):"
#define XREG_E "Cross Track Registration Err vs HH (m):"
#define AREG_CL_E "Along Track Registration Err CHH/LHH (m):"
#define XREG_CL_E "Cross Track Registration Err CHH/LHH (m):"
/* SAR Leader: Data Histograms Headers */
#define HIST_DESCR "Histogram Descriptor:"
#define HIST_REQ "Records Req to Reconstitute Histogram Table:"
#define TABLE_NO "Sequence Number in Histogram Table:"
#define TABLE_SIZE "Histogram Table Size (bytes):"
#define HIST_SAMP "Number of Samples per Range Line:"
#define HIST_PIX "Number of Pixels per Image Line:"
#define HIST_RECS "Number of Range Lines:"
#define HIST_LINES "Number of Image Lines:"
#define CROSS_PIX "Data Samples/Pixels per Group, Cross Track:"
#define ALONG_PIX "Data Lines per Group, Along Track:"
#define CROSS_GPS "Number of Groups, Cross Track:"
#define ALONG_GPS "Number of Groups, Along Track:"
#define MIN_PIXEL "Minimum Sample Value:"
#define MAX_PIXEL "Maximum Sample Value:"
#define HIST_MEAN "Mean Sample Value:"
#define HIST_ST_DEV "Standard Deviation of Sample Value:"
#define INCREMENT "Sample Value Increment:"
#define MIN_TABLE "Minimum Histogram Table Value:"
#define MAX_TABLE "Maximum Histogram Table Value:"
#define HIST_N_BINS "Number of Bins:"
/* SAR Leader: Range Spectra Headers */
#define SP_REC_REQ "Records Req to Reconstitute Spectra Table:"
#define SP_TBL_NO "Sequence Number in Range Spectra Table:"
#define SP_SAMPS "Total Number of Samples in Range Direction:"
#define SP_PIX_OFF "Number of Samples Offset from 1st Sample:"
#define SP_INT_LINES "No. of Range Lines Integrated for Spectra:"
#define FIRST_FREQ "Center Frequency of First Spectra Bin (MHz):"
#define LAST_FREQ "Center Frequency of Last Spectra Bin (MHz):"
#define SP_MINP "Minimum Spectral Power (dB):"
#define SP_MAXP "Maximum Spectra Power (dB):"
#define SP_N_BINS "Number of Frequency Bins in Table:"
#define BIN_VALUES "Bin Values Bin Values"
/* SAR Leader: Radar Parameter Update Headers */
#define UPD_GMT "GMT of Change (YYYYMMDD hhmm:ss.ttt):"
#define UPD_LINE_NO "Radar Data Line Number of Update:"
#define UPD_PIXEL "Radar Data Sample Number of Update:"
#define UPD_DESCR "Parameter Descriptor:"
#define DWP_VALUE "Parameter Value (microsecs):"
#define GAIN_VALUE "Parameter Value (dB):"
#define RDR_DWP_STR "DWP Update"
#define RDR_GAIN_STR "Receiver Gain Update"
/* SAR Leader: Detailed Processing Parameters Headers */
#define FLYWHL "Number of Flywheels:"
#define MISSING "Missing Lines Start Frame End Frame"
#define MISS_CH1 " Channel 1:"
#define MISS_CH2 " Channel 2:"
#define MISS_CH3 " Channel 3:"
#define MISS_CH4 " Channel 4:"
#define MORE_MISS " More Missing Lines?"
#define REFCALHH "Reference Caltone Gain Setting HH (dBmW):"
#define REFCALHV "Reference Caltone Gain Setting HV (dBmW):"
#define REFCALVV "Reference Caltone Gain Setting VV (dBmW):"
#define REFCALVH "Reference Caltone Gain Setting VH (dBmW):"
#define MEANCALHH "Mean of Caltone Gain Estimates HH (dBmW):"
#define MEANCALHV "Mean of Caltone Gain Estimates HV (dBmW):"
#define MEANCALVV "Mean of Caltone Gain Estimates VV (dBmW):"
#define MEANCALVH "Mean of Caltone Gain Estimates VH (dBmW):"
#define DEVCALHH "Std Deviation of Caltone Gain Est HH (dBmW):"
#define DEVCALHV "Std Deviation of Caltone Gain Est HV (dBmW):"
#define DEVCALVV "Std Deviation of Caltone Gain Est VV (dBmW):"
#define DEVCALVH "Std Deviation of Caltone Gain Est VH (dBmW):"
#define OVERSAT_HH "Oversat in Raw Histogram HH (Mean %):"
#define OVERSAT_HV "Oversat in Raw Histogram HV (Mean %):"
#define OVERSAT_VV "Oversat in Raw Histogram VV (Mean %):"
#define OVERSAT_VH "Oversat in Raw Histogram VH (Mean %):"
#define UNDERSAT_HH "Undersat in Raw Histogram HH (Mean %):"
#define UNDERSAT_HV "Undersat in Raw Histogram HV (Mean %):"
#define UNDERSAT_VV "Undersat in Raw Histogram VV (Mean %):"
#define UNDERSAT_VH "Undersat in Raw Histogram VH (Mean %):"
#define PROC_RUN "Processing Run Number:"
#define MISSION_ID "Mission ID (Flight Number):"
#define BEAM_SPOIL "Antenna Beam Spoiling Mode (0-7):"
#define START_GMT "GMT, Image Start (YYYY/MM/DD hh:mm:ss.ttt):"
#define ST_GMT_SEC "GMT, Image Start (s):"
#define IMAGE_DUR "Image Duration (s):"
#define NEAR_SLANT "Near Slant Range (km):"
#define CTR_RADIUS "Earth Radius at Image Center (km):"
#define NADIR_RADIUS "Earth Radius at Nadir (km):"
#define YEAR_0MET "GMT of 0 MET, Year:"
#define DAY_0MET "GMT of 0 MET, Days:"
#define HOUR_0MET "GMT of 0 MET, Hours:"
#define MIN_OMET "GMT of 0 MET, Minutes:"
#define SEC_0MET "GMT of 0 MET, Seconds:"
#define DRIFT "MET Drift Time (10**-6):"
#define FD0_CONST "Fd0 Constant Term (Hz):"
#define FD0_LIN "Fd0 Linear Coefficient (10**-3 Hz):"
#define FD0_QUAD "Fd0 Quadratic Coefficient (10**-7 Hz):"
#define FD1_CONST "Fd1 Constant Term (10**-3 Hz):"
#define FD1_LIN "Fd1 Linear Coefficient (10**-6 Hz):"
#define FD1_QUAD "Fd1 Quadratic Coefficient (10**-10 Hz):"
#define FD2_CONST "Fd2 Constant Term (10**-7 Hz):"
#define FD2_LIN "Fd2 Linear Coefficient (10**-10 Hz):"
#define FD2_QUAD "Fd2 Quadratic Coefficient (10**-14 Hz):"
#define FR0_CONST "Fr0 Constant Term (Hz/sec):"
#define FR0_LIN "Fr0 Linear Coefficient (10**-3 Hz/sec):"
#define FR0_QUAD "Fr0 Quadratic Coefficient (10**-7 Hz/sec):"
#define FR1_CONST "Fr1 Constant Term (10**-3 Hz/sec):"
#define FR1_LIN "Fr1 Linear Coefficient (10**-6 Hz/sec):"
#define FR1_QUAD "Fr1 Quadratic Coefficient (10**-10 Hz/sec):"
#define FR2_CONST "Fr2 Constant Term (10**-7 Hz/sec):"
#define FR2_LIN "Fr2 Linear Coefficient (10**-10 Hz/sec):"
#define FR2_QUAD "Fr2 Quadratic Coefficient (10**-14 Hz/sec):"
#define PROC_DATE "Data Processing Date (MM-DD-YYYY):"
#define RAEST "Average Roll Angle Estimates (deg):"
#define CHAN_IMB "Imbalance Between HH and VV (dB):"
#define PHASE_IMB "Phase Error Between HH and VV (deg):"
#define NEAR_INC "Near Range Incidence Angle (deg):"
#define FAR_INC "Far Range Incidence Angle (deg):"
#define AZ_REF_LEN "Az Ref Function Len at mid-swath (samples):"
#define SIG_GAIN "Signal Processing Gain:"
#define HH_PHASE "HH Caltone Phase Estimate (deg):"
#define HV_PHASE "HV Caltone Phase Estimate (deg):"
#define VV_PHASE "VV Caltone Phase Estimate (deg):"
#define VH_PHASE "VH Caltone Phase Estimate (deg):"
#define POLINDX "Internal SIR-C Polarization Index:"
#define SAMP_OFF "Offset to First Processing Range Sample:"
#define STEER_ANGLE "Range Electronic Steering Angle (deg):"
/* Calibration Data Record Headers */
#define CAL_COEF "Absolute Calibration Coefficient (dB):"
#define MATRIX_TITLE "4x4 Polarimetric Calibration (Complex) Matrix:"
#define CAL_MAP1 " 1 2 3 4"
#define CAL_MAP2 " 5 6 7 8"
#define CAL_MAP3 " 9 10 11 12"
#define CAL_MAP4 "13 14 15 16"
/* Imagery Options File: File Descriptor Record Headers */
#define RSD_HDR_SIZE "Header bytes in RSD data product:"
#define N_SAR_RECS "SAR Data Record Count:"
#define SAR_REC_LEN "SAR Record Length (Bytes):"
#define POLAR_STR "Image or RSD polarizations:"
#define BITS_SPAMP "Bits Per Sample/Pixel (RSD & MLD Only):"
#define PIX_GP "Pixels Per Data Group:"
#define BYTES_GP "Bytes Per Data Group:"
#define N_SAR_CHAN "Number of SAR Polarization Channels:"
#define N_LINES_IMG "Number of Image Lines this Channel:"
#define LEFT_BD_PIX "Left Border Pixels per Line:"
#define N_PIX_LINE "Samples/Pixels/Data Groups per Line:"
#define RIGHT_BD_PIX "Right Border Pixels per Line:"
#define TOP_LINES "Top Border Scan Lines:"
#define BOTTOM_LINES "Bottom Border Scan Lines:"
#define INTERLEAVE "Interleaving Indicator:"
#define RECS_LINE "Physical Records Per Line:"
#define RECS_CHAN "Physical Records Per Multi-Channel Line:"
#define LINE_PREFIX "Length of Prefix Data per Line (Bytes):"
#define BYTES_LINE "Bytes of Sample/Image Data per Line:"
#define LINE_SUFFIX "Length of Suffix Data per Line (Bytes):"
#define SAR_FORMAT "SAR Format Indicator:"
#define LT_PIX_FILL "Left Fill Bits within Pixel:"
#define RT_PIX_FILL "Right Fill Bits within Pixel:"
#endif /* CEOS_RD_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,146 @@
/*******************************************************************************
File : statistics.h
Project : ESA_POLSARPRO
Authors : Carlos LOPEZ MARTINEZ
Version : 1.1
Creation : 06/2005
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : STATISTICS Routines
*-------------------------------------------------------------------------------
Routines :
float MeanVectorReal(float *VC, int Ncol);
float SecondOrderCenteredVectorReal(float *VC, int Ncol);
float SecondOrderNonCenteredVectorReal(float *VC, int Ncol);
float ThirdOrderCenteredVectorReal(float *VC, int Ncol);
float ThirdOrderNonCenteredVectorReal(float *VC, int Ncol);
float FourthOrderCenteredVectorReal(float *VC, int Ncol);
float FourthOrderNonCenteredVectorReal(float *VC, int Ncol);
float MeanMatrixReal(float **MT,int Nlin, int Ncol);
float SecondOrderCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float SecondOrderNonCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float ThirdOrderCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float ThirdOrderNonCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float FourthOrderCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float FourthOrderNonCenteredMatrixReal(float **MT,int Nlin, int Ncol);
void HistogramVectorReal(float *VC, int Ncol, float min_value, float max_value, int Nbin, float *Xhist, float *Yhist);
void HistogramMatrixReal(float **MT, int Nlin, int Ncol, float min_value, float max_value, int Nbin, float *Xhist, float *Yhist);
int comp_float(const void *a, const void *b);
void chisq(float *bins, float *ebins, int nbins, int knstrn, float *df, float *chsq, float *prob);
float gammln(float xx);
void gser(float *gamser, float a, float x, float *gln);
void gcf(float *gammcf, float a, float x, float *gln);
float gammp(float a, float x);
float gammq(float a, float x);
void chisq_testVector(float *VC, int Ncol, float min_value, float max_value, int Nbin, int pdf_case, float *df, float *chsq, float *prob);
void GaussHist(float mean, float var, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void ExpHist(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void RayHist(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void UnifHist(float min_value, float max_value, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void HistogramVectorRealNorm(float *VC, int Ncol, float min_value, float max_value, int Nbin, float *Xhist, float *Yhist);
void GaussHistNorm(float mean, float var, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void ExpHistNorm(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void RayHistNorm(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void UnifHistNorm(float min_value, float max_value, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
float probks(float alam);
void ksks(float data1[],float *xvalues, unsigned long nbins1, float data2[], unsigned long nbins2 ,float *d, float *prob);
void ks_testVector(float *VC, int Ncol, float min_value, float max_value, int Nbin, int pdf_case, float *d, float *prob);
float GaussCDF(float x);
float erff(float x);
float ExpCDF(float x);
float RayCDF(float x);
float UnifCDF(float x);
float AmplitudeComplex(float Re, float Im);
float PhaseComplex(float Re, float Im);
void CorrelationFactor(float *S1_re, float *S1_im, float *S2_re, float *S2_im, float Ncol, float *rho_amp, float *rho_phase);
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagStatistics
#define FlagStatistics
#include "PolSARproLib.h"
float MeanVectorReal(float *VC, int Ncol);
float SecondOrderCenteredVectorReal(float *VC, int Ncol);
float SecondOrderNonCenteredVectorReal(float *VC, int Ncol);
float ThirdOrderCenteredVectorReal(float *VC, int Ncol);
float ThirdOrderNonCenteredVectorReal(float *VC, int Ncol);
float FourthOrderCenteredVectorReal(float *VC, int Ncol);
float FourthOrderNonCenteredVectorReal(float *VC, int Ncol);
float MeanMatrixReal(float **MT,int Nlin, int Ncol);
float SecondOrderCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float SecondOrderNonCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float ThirdOrderCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float ThirdOrderNonCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float FourthOrderCenteredMatrixReal(float **MT,int Nlin, int Ncol);
float FourthOrderNonCenteredMatrixReal(float **MT,int Nlin, int Ncol);
void HistogramVectorReal(float *VC, int Ncol, float min_value, float max_value, int Nbin, float *Xhist, float *Yhist);
void HistogramMatrixReal(float **MT, int Nlin, int Ncol, float min_value, float max_value, int Nbin, float *Xhist, float *Yhist);
int comp_float(const void *a, const void *b);
void chisq(float *bins, float *ebins, int nbins, int knstrn, float *df, float *chsq, float *prob);
float gammln(float xx);
void gser(float *gamser, float a, float x, float *gln);
void gcf(float *gammcf, float a, float x, float *gln);
float gammp(float a, float x);
float gammq(float a, float x);
void chisq_testVector(float *VC, int Ncol, float min_value, float max_value, int Nbin, int pdf_case, float *df, float *chsq, float *prob);
void GaussHist(float mean, float var, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void ExpHist(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void RayHist(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void UnifHist(float min_value, float max_value, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void HistogramVectorRealNorm(float *VC, int Ncol, float min_value, float max_value, int Nbin, float *Xhist, float *Yhist);
void GaussHistNorm(float mean, float var, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void ExpHistNorm(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void RayHistNorm(float mean, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
void UnifHistNorm(float min_value, float max_value, int Nsamples, int Nbin, float *Xvalue, float *ThHist);
float probks(float alam);
//void ksks(float data1[],float *xvalues, unsigned long nbins1, float data2[], unsigned long nbins2 ,float *d, float *prob);
void ksks(float *data,float *xvalues, unsigned long nbins, float (*func)(float),float *d, float *prob);
void ks_testVector(float *VC, int Ncol, float min_value, float max_value, int Nbin, int pdf_case, float *d, float *prob);
float GaussCDF(float x);
float erff(float x);
float ExpCDF(float x);
float RayCDF(float x);
float UnifCDF(float x);
float AmplitudeComplex(float Re, float Im);
float PhaseComplex(float Re, float Im);
void CorrelationFactor(float *S1_re, float *S1_im, float *S2_re, float *S2_im, float Ncol, float *rho_amp, float *rho_phase);
#endif

View File

@ -0,0 +1,546 @@
/*******************************************************************************
PolSARpro v5.0 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 (1991) of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details.
********************************************************************************
File : sub_aperture.c
Project : ESA_POLSARPRO
Authors : Laurent FERRO-FAMIL
Version : 1.0
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : SUB APERTURE Routines
*-------------------------------------------------------------------------------
Routines :
void write_config_sub(char *dir, int Nlig, int Ncol, char *PolarCase, char *PolarType, int nim, int Nsub_im, float pct, float squint);
void hamming(float ham_a,float *ham_win,int n);
void estimate_spectrum(FILE *in_file[],int Npolar,float **spectrum, float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag);
void estimate_dopplershift(int Npolar,float **spectrum,int *offset_az,int N,int N_smooth);
void correction_function(int Npolar,float **spectrum,float **correc,int weight,int *lim1,int *lim2,int N,int N_smooth,int offset_az);
void compensate_spectrum(FILE *in_file,float *correc,float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag,int offset_az);
void select_sub_spectrum(float **fft_im,float **c_im,int offset,float *ham_win,int n_ham,float *vec1,int N,int Nrg);
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#include "PolSARproLib.h"
/*******************************************************************************
Routine : write_config
Authors : Laurent FERRO-FAMIL
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
Description : Writes an image number of lines and rows from a configuration file
*-------------------------------------------------------------------------------
Inputs arguments :
dir : location of the config.txt file
Nlig : number of lines to be written
Ncol : number of rows to be written
PolarCase : Polarimetric Case (Monostatic, Bistatic, Intensities)
PolarType : Polarimetric Data Type (full, pp1,pp2,pp3,pp5,pp6,pp7)
nim : Sub Aperture Number
Nsub_im : Total Sub Aperture Number
pct : Resolution Fraction
squint : FrequencyOffset
Returned values :
void
*******************************************************************************/
void write_config_sub(char *dir, int Nlig, int Ncol, char *PolarCase, char *PolarType, int nim, int Nsub_im, float pct, float squint)
{
char file_name[FilePathLength];
FILE *file;
sprintf(file_name,"%sconfig.txt",dir);
if ((file=fopen(file_name,"w"))==NULL)
edit_error("Could not open configuration file : ",file_name);
fprintf(file, "Nrow\n");
fprintf(file, "%i\n", Nlig);
fprintf(file, "---------\n");
fprintf(file, "Ncol\n");
fprintf(file, "%i\n", Ncol);
fprintf(file, "---------\n");
fprintf(file, "PolarCase\n");
fprintf(file, "%s\n", PolarCase);
fprintf(file, "---------\n");
fprintf(file, "PolarType\n");
fprintf(file, "%s\n", PolarType);
fprintf(file, "---------\n");
fprintf(file, "Sub Aperture Number\n");
fprintf(file, "%i\n", nim);
fprintf(file, "---------\n");
fprintf(file, "Total Sub Aperture Number\n");
fprintf(file, "%i\n", Nsub_im);
fprintf(file, "---------\n");
fprintf(file, "ResolutionFraction(pct)\n");
fprintf(file, "%7.3f\n",pct);
fprintf(file, "---------\n");
fprintf(file, "FrequencyOffset(pct)\n");
fprintf(file, "%7.3f\n",squint);
fclose(file);
}
/*******************************************************************************
Routine : hamming
Authors : Laurent FERRO-FAMIL
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
Description : Create a Hamming weighting function
*-------------------------------------------------------------------------------
Inputs arguments :
ham_win : Hamming Window
n : number of points
Returned values :
void
*******************************************************************************/
void hamming(float ham_a,float *ham_win,int n)
{
int lig;
if(!(n%2))
edit_error("Hamming window width is not an odd number of pixels","");
for(lig=0;lig<n;lig++)
ham_win[lig] = ham_a+(1-ham_a)*cos(2*pi*(lig-(n-1)/2)/n);
}
/*******************************************************************************
Routine : estimate_spectrum
Authors : Laurent FERRO-FAMIL
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
Description : Estimation of the SAR image Doppler spectrum
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void estimate_spectrum(FILE *in_file[],int NNpolar,float **spectrum, float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag)
{
int az,rg,lig,col,np;
float *M_in;
M_in = vector_float(2*Ncol);
/* READING */
for(np=0;np<NNpolar;np++)
{
/* Read input image */
for (az=0; az<2*N; az++)
for (rg=0; rg<Nrg; rg++)
fft_im[rg][az] = 0.;
for (az=0; az<N; az++) spectrum[np][az] = 0;
for (lig=0; lig<Nlig; lig++)
{
if (lig%(int)(Nlig/20) == 0) {printf("%f\r", 100. * lig * (np+1) / (Nlig - 1) / NNpolar);fflush(stdout);}
fread(&M_in[0],sizeof(float),2*Ncol,in_file[np]);
if (AzimutFlag == 1)
{
/* Transpose the input image to perform the FFT over the lines */
for (col=0; col<Ncol; col++)
{
fft_im[col][2*lig] = M_in[2*col];
fft_im[col][2*lig+1] = M_in[2*col+1];
}
}
else
{
for (col=0; col<Ncol; col++)
{
fft_im[lig][2*col] = M_in[2*col];
fft_im[lig][2*col+1] = M_in[2*col+1];
}
}
} /*end lig */
/* FORWARD FFT AND SPECTRUM AVERAGING IN RANGE*/
for(rg=0; rg<Nrg; rg++)
{
Fft(fft_im[rg],N,+1);
/* Now sum up in the range direction the amplitudes of the different azimuth spectra*/
for(az=0; az<N; az++)
spectrum[np][az] += sqrt(fft_im[rg][2*az]*fft_im[rg][2*az]+fft_im[rg][2*az+1]*fft_im[rg][2*az+1])/Nrg;
}
} /* end np */
}
/*******************************************************************************
Routine : correction_function
Authors : Laurent FERRO-FAMIL
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
Description : Creation of the correction function
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void correction_function(int NNpolar,float **spectrum,float **correc,int weight,int *lim1,int *lim2,int N,int N_smooth,int offset_az)
{
int az,np,vlim1,vlim2,lim1_max,lim2_min,ii,jj;
float *vec,*vec0,max,mean,mean2,cv;
int azz;
vec0 = vector_float(2*N);
vec = vector_float(2*N);
/**********************************/
/* SPECTRUM LIMITS ESTIMATION */
/**********************************/
lim1_max = -1;
lim2_min = 2*N;
for(np=0;np<NNpolar;np++) {
for(az=0;az<N;az++) {
vec0[az] = spectrum[np][az];
vec0[az+N] = spectrum[np][az];
}
/* smoothing to obtain a better estimate of the spectrum amplitude*/
max = 0; mean = 0;
az=(N_smooth-1)/2;
for(ii=-(N_smooth-1)/2;ii<(N_smooth-1)/2+1;ii++) mean += vec0[az+ii]/N_smooth;
vec[az] = mean;
for(az=1+(N_smooth-1)/2;az<2*N-(N_smooth-1)/2;az++) {
ii = -1-(N_smooth-1)/2; jj = (N_smooth-1)/2;
mean += (vec0[az+jj]-vec0[az+ii])/N_smooth;
vec[az] = mean;
}
if(weight) {
vlim1 = 0;
vlim2 = 0;
/* If the original spectrum has been weighted for side-lobe suppression,
estimate the weighting function limits */
/* Variation coefficient computation for spectrum limits determination */
max = 0;
for(az=0;az<N;az++) {
/* Reinitialization of the maximum CV value at zero frequency
in order to detect both lower and upper spectrum limits */
if(az==N/2) max =0;
azz = az + offset_az + N/2;
/* N_smooth samples sliding averaging filter around the lig offset */
mean = 0; mean2 = 0;
for(ii=-(N_smooth-1)/2;ii<(N_smooth-1)/2+1;ii++) {
mean += vec[azz+ii];
mean2 += vec[azz+ii]*vec[azz+ii];
}
mean /=N_smooth; mean2 /=N_smooth;
cv = sqrt(mean2-mean*mean)/mean;
if(cv > max) {
max = cv;
if(az < N/2) vlim1 = az;
else vlim2 = az;
}
}
/*Security Offset*/
vlim1 += (N_smooth-1)/2;
vlim2 -= (N_smooth-1)/2;
/*Store extreme values for lig1, lig2 */
if(vlim1>lim1_max) lim1_max = vlim1;
if(vlim2<lim2_min) lim2_min = vlim2;
/*weight*/
} else {
/* Original spectrum has not been weighted for side-lobe suppression*/
/* Set lim1 and lim2 to arbitrary values*/
if((*lim2) < 0) {
lim1_max = N_smooth;
lim2_min = N-N_smooth-1;
} else {
/* Set lim1 and lim2 to user-defined values*/
lim1_max = (*lim1);
lim2_min = N-(*lim2)-1;
}
}/*weight*/
}/*np*/
(*lim1) = lim1_max;
(*lim2) = lim2_min;
/*************************************/
/* CORRECTION FUNCTION ESTIMATION */
/*************************************/
for(np=0;np<NNpolar;np++) {
for(az=0;az<N;az++) {
vec0[az] = spectrum[np][az];
vec0[az+N] = spectrum[np][az];
}
/* smoothing to obtain a better estimate of the spectrum amplitude*/
max = 0; mean = 0;
az=(N_smooth-1)/2;
for(ii=-(N_smooth-1)/2;ii<(N_smooth-1)/2+1;ii++) mean += vec0[az+ii]/N_smooth;
vec[az] = mean;
for(az=1+(N_smooth-1)/2;az<2*N-(N_smooth-1)/2;az++) {
ii = -1-(N_smooth-1)/2; jj = (N_smooth-1)/2;
mean += (vec0[az+jj]-vec0[az+ii])/N_smooth;
vec[az] = mean;
if(mean > max) max = mean;
}
for(az=0;az<N;az++) {
azz = az + offset_az + N/2;
vec[az] = max / vec[azz+ii];
}
/* Inverse FFT circular shift */
for(az=0;az<N/2;az++) {
correc[np][az] = vec[az+N/2];
correc[np][az+N/2] = vec[az];
}
}/*np*/
free_vector_float(vec);
free_vector_float(vec0);
}
/*******************************************************************************
Routine : compensate_spectrum
Authors : Laurent FERRO-FAMIL
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
Description : determination of the SAR image Doppler compensated spectrum
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void compensate_spectrum(FILE *in_file,float *correc,float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag,int offset_az)
{
int az,rg,lig,col;
float *M_in;
float *vec;
M_in = vector_float(2*Ncol);
vec = vector_float(2*N);
/* Read a polarization channel image */
rewind(in_file);
for (az=0; az<2*N; az++)
for (rg=0; rg<Nrg; rg++)
fft_im[rg][az] = 0.;
for (lig=0; lig<Nlig; lig++) {
if (lig%(int)(Nlig/20) == 0) {printf("%f\r", 100. * lig / (Nlig - 1));fflush(stdout);}
fread(&M_in[0],sizeof(float),2*Ncol,in_file);
if (AzimutFlag == 1) {
/* Transpose --> Azimuth decomposition */
for (col=0; col<Ncol; col++) {
fft_im[col][2*lig] = M_in[2*col];
fft_im[col][2*lig+1] = M_in[2*col+1];
}
} else {
for (col=0; col<Ncol; col++) {
fft_im[lig][2*col] = M_in[2*col];
fft_im[lig][2*col+1] = M_in[2*col+1];
}
}
} /*end lig */
/* Compute the FFT */
for(rg=0; rg<Nrg; rg++) {
Fft(fft_im[rg],N,+1);
for(az=0;az<N;az++) {
vec[az] = fft_im[rg][2*az]; vec[az+N] = fft_im[rg][2*az];
}
if (offset_az > 0) for(az=0; az<N; az++) fft_im[rg][2*az] = vec[az+offset_az];
else for(az=0; az<N; az++) fft_im[rg][2*az] = vec[az+offset_az+N];
for(az=0;az<N;az++) {
vec[az] = fft_im[rg][2*az+1]; vec[az+N] = fft_im[rg][2*az+1];
}
if (offset_az > 0) for(az=0; az<N; az++) fft_im[rg][2*az+1] = vec[az+offset_az];
else for(az=0; az<N; az++) fft_im[rg][2*az+1] = vec[az+offset_az+N];
for(az=0; az<N; az++) {
fft_im[rg][2*az] *= correc[az];
fft_im[rg][2*az+1] *= correc[az];
}
}
free_vector_float(M_in);
free_vector_float(vec);
}
/*******************************************************************************
Routine : select_sub_spectrum
Authors : Laurent FERRO-FAMIL
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
Description : Selection of a SAR image Doppler sub-spectrum
*-------------------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************************/
void select_sub_spectrum(float **fft_im,float **c_im,int offset,float *ham_win,int n_ham,float *vec1,int N,int Nrg)
{
int az,rg;
/*hamming window within the limits */
for(az=0;az<N;az++) vec1[az] = 0;
for(az=0;az<n_ham;az++) vec1[offset+az]=ham_win[az];
for(rg=0;rg<Nrg;rg++) {
for(az=0;az<N/2;az++) {
c_im[rg][2*az] = fft_im[rg][2*az]*vec1[az+N/2];
c_im[rg][2*az+1] = fft_im[rg][2*az+1]*vec1[az+N/2];
c_im[rg][2*(az+N/2)] = fft_im[rg][2*(az+N/2)]*vec1[az];
c_im[rg][2*(az+N/2)+1] = fft_im[rg][2*(az+N/2)+1]*vec1[az];
}
Fft(c_im[rg],N,-1);
}
}
/*******************************************************************
Routine : estimate_dopplershift
Authors : Eric POTTIER
Creation : 04/2012
Update :
*-------------------------------------------------------------------
Description : Estimation of the Doppler Shift
*-------------------------------------------------------------------
Inputs arguments :
Returned values :
void
*******************************************************************/
void estimate_dopplershift(int NNpolar,float **spectrum,int *offset_az,int N,int N_smooth)
{
int az,ii,jj;
float *vec,*vec0,mean;
//float max;
//float PowLeft, PowRight, PowTotal, PowMax;
float PowMin;
int off_az, lim1, lim2;
int imin;
vec0 = vector_float(2*N);
vec = vector_float(2*N);
// PowLeft = 0.; PowRight = 0.; PowTotal = 0.; PowMax = 0.;
PowMin = 0.;
for(az=0;az<N;az++) {
vec0[az] = spectrum[0][az];
vec0[az+N] = spectrum[0][az];
}
/* smoothing from lim1 to lim2 to obtain a better estimate of the spectrum amplitude*/
lim1 = (N_smooth-1)/2;
lim2 = 2*N-(N_smooth-1)/2;
// max = 0;
mean = 0;
az=lim1;
for(ii=-(N_smooth-1)/2;ii<(N_smooth-1)/2+1;ii++) mean += vec0[az+ii]/N_smooth;
vec[az] = mean;
for(az=lim1+1;az<lim2;az++) {
ii = -1-(N_smooth-1)/2; jj = (N_smooth-1)/2;
mean += (vec0[az+jj]-vec0[az+ii])/N_smooth;
vec[az] = mean;
}
PowMin = vec[0+N/2];
for(az=0; az<N; az++) {
if (vec[az+N/2] < PowMin ) {
PowMin = vec[az+N/2];
imin = az;
}
}
/*
off_az = 0;
PowLeft = 0.; PowRight = 0.;
for(az=0;az<N/2;az++) {
PowLeft += vec[az+N/2];
PowRight += vec[az+N];
}
PowTotal = PowLeft + PowRight;
PowLeft = PowLeft/PowTotal; PowRight = PowRight/PowTotal;
if (PowLeft <= PowRight) {
off_az += (int) ((N/2)*(PowRight - 0.50));
} else {
off_az -= (int) ((N/2)*(PowLeft - 0.50));
}
flagaz = 0;
while (flagaz == 0) {
PowLeft = 0.; PowRight = 0.;
for(az=0;az<N/2;az++) {
azz = az + off_az;
PowLeft += vec[azz+N/2];
PowRight += vec[azz+N];
}
PowTotal = PowLeft + PowRight;
PowLeft = PowLeft/PowTotal; PowRight = PowRight/PowTotal;
if (PowLeft <= PowRight) {
if ((PowRight - 0.50) <= 0.005) {
flagaz = 1;
} else {
off_az ++;
}
} else {
if ((PowLeft - 0.50) <= 0.005) {
flagaz = 1;
} else {
off_az --;
}
}
}
*/
off_az = imin;
(*offset_az) = off_az;
free_vector_float(vec);
free_vector_float(vec0);
}

View File

@ -0,0 +1,60 @@
/*******************************************************************************
File : sub_aperture.h
Project : ESA_POLSARPRO
Authors : Laurent FERRO-FAMIL
Version : 1.0
Creation : 04/2005
Update :
*-------------------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Groupe Image et Teledetection
Equipe SAPHIR (SAr Polarimetrie Holographie Interferometrie Radargrammetrie)
UNIVERSITE DE RENNES I
Pôle Micro-Ondes Radar
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail : eric.pottier@univ-rennes1.fr, laurent.ferro-famil@univ-rennes1.fr
*-------------------------------------------------------------------------------
Description : SUB APERTURE Routines
*-------------------------------------------------------------------------------
Routines :
void write_config_sub(char *dir, int Nlig, int Ncol, char *PolarCase, char *PolarType, int nim, int Nsub_im, float pct, float squint);
void hamming(float ham_a,float *ham_win,int n);
void estimate_spectrum(FILE *in_file[],int Npolar,float **spectrum, float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag);
void estimate_dopplershift(int Npolar,float **spectrum,int *offset_az,int N,int N_smooth);
void correction_function(int Npolar,float **spectrum,float **correc,int weight,int *lim1,int *lim2,int N,int N_smooth,int offset_az);
void compensate_spectrum(FILE *in_file,float *correc,float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag,int offset_az);
void select_sub_spectrum(float **fft_im,float **c_im,int offset,float *ham_win,int n_ham,float *vec1,int N,int Nrg);
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagSubAperture
#define FlagSubAperture
#include "PolSARproLib.h"
void write_config_sub(char *dir, int Nlig, int Ncol, char *PolarCase, char *PolarType, int nim, int Nsub_im, float pct, float squint);
void hamming(float ham_a,float *ham_win,int n);
void estimate_spectrum(FILE *in_file[],int NNpolar,float **spectrum, float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag);
void correction_function(int NNpolar,float **spectrum,float **correc,int weight,int *lim1,int *lim2,int N,int N_smooth,int offset_az);
void compensate_spectrum(FILE *in_file,float *correc,float **fft_im,int Nlig,int Ncol,int N,int Naz,int Nrg,int AzimutFlag,int offset_az);
void select_sub_spectrum(float **fft_im,float **c_im,int offset,float *ham_win,int n_ham,float *vec1,int N,int Nrg);
void estimate_dopplershift(int NNpolar,float **spectrum,int *offset_az,int N,int N_smooth);
#endif

View File

@ -0,0 +1,594 @@
/********************************************************************
PolSARpro v5.0 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 (1991) of
the License, or any later version. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details
*********************************************************************
File : surface_inversion_oh2004.c
Project : ESA_POLSARPRO
Authors : Yin Qiang, Eric POTTIER (v2.0)
Version : 2.0
Creation : 03/2008
Update : 05/2009, 08/2011
*--------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Image and Remote Sensing Group
SAPHIR Team
(SAr Polarimetry Holography Interferometry Radargrammetry)
UNIVERSITY OF RENNES I
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail: eric.pottier@univ-rennes1.fr
*--------------------------------------------------------------------
Description : Surface Parameter Data Inversion : Oh 2004 Procedure
********************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
/* ROUTINES DECLARATION */
#include "PolSARproLib.h"
void oh2004(float** valid, float** theta, int Nlig, int Ncol, float** Shhhh, float** Svvvv, float** Shvhv, float** mv_oh, float** s_oh, float** msk_out, float** msk_valid, float Freq, float thres1, float thres2);
float** mv_inv1, ** mv_inv2, ** mv_inv3, ** ks_inv1, ** ks_inv2;
/********************************************************************
*********************************************************************
*
* -- Function : Main
*
*********************************************************************
********************************************************************/
int main(int argc, char* argv[])
{
#define NPolType 5
/* LOCAL VARIABLES */
FILE* in_file_angle;
FILE* out_mv, * out_s, * out_maskout, * out_maskin, * out_maskinout;
int Config;
char* PolTypeConf[NPolType] = { "S2", "C3", "C4", "T3", "T4" };
char file_name[FilePathLength], anglefile[FilePathLength];
/* Internal variables */
int ii, lig, col;
int Unit;
float Freq;
float threshold1, threshold2;
/* Matrix arrays */
float*** M_avg;
float** Shhhh;
float** Shvhv;
float** Svvvv;
float** s;
float** mv;
float** mask_in;
float** mask_out;
float** mask_in_out;
float** angle;
/********************************************************************
********************************************************************/
/* USAGE */
strcpy(UsageHelp, "\nsurface_inversion_oh2004.exe\n");
strcat(UsageHelp, "\nParameters:\n");
strcat(UsageHelp, " (string) -id input directory\n");
strcat(UsageHelp, " (string) -od output directory\n");
strcat(UsageHelp, " (string) -iodf input-output data format\n");
strcat(UsageHelp, " (string) -ang incidence angle file\n");
strcat(UsageHelp, " (int) -ofr Offset Row\n");
strcat(UsageHelp, " (int) -ofc Offset Col\n");
strcat(UsageHelp, " (int) -fnr Final Number of Row\n");
strcat(UsageHelp, " (int) -fnc Final Number of Col\n");
strcat(UsageHelp, " (float) -fr Central Frequency (GHz)\n");
strcat(UsageHelp, " (int) -un Angle Unit (0: deg, 1: rad)\n");
strcat(UsageHelp, " (float) -th1 Threshold - mv\n");
strcat(UsageHelp, " (float) -th2 Threshold - s\n");
strcat(UsageHelp, "\nOptional Parameters:\n");
strcat(UsageHelp, " (string) -mask mask file (valid pixels)\n");
strcat(UsageHelp, " (int) -mem Allocated memory for blocksize determination (in Mb)\n");
strcat(UsageHelp, " (string) -errf memory error file\n");
strcat(UsageHelp, " (noarg) -help displays this message\n");
strcat(UsageHelp, " (noarg) -data displays the help concerning Data Format parameter\n");
/********************************************************************
********************************************************************/
strcpy(UsageHelpDataFormat, "\nPolarimetric Input-Output Data Format\n\n");
for (ii = 0; ii < NPolType; ii++) CreateUsageHelpDataFormatInput(PolTypeConf[ii]);
strcat(UsageHelpDataFormat, "\n");
/********************************************************************
********************************************************************/
/* PROGRAM START */
if (get_commandline_prm(argc, argv, "-help", no_cmd_prm, NULL, 0, UsageHelp)) {
printf("\n Usage:\n%s\n", UsageHelp); exit(1);
}
if (get_commandline_prm(argc, argv, "-data", no_cmd_prm, NULL, 0, UsageHelpDataFormat)) {
printf("\n Usage:\n%s\n", UsageHelpDataFormat); exit(1);
}
if (argc < 25) {
edit_error("Not enough input arguments\n Usage:\n", UsageHelp);
}
else {
get_commandline_prm(argc, argv, "-id", str_cmd_prm, in_dir, 1, UsageHelp);
get_commandline_prm(argc, argv, "-od", str_cmd_prm, out_dir, 1, UsageHelp);
get_commandline_prm(argc, argv, "-iodf", str_cmd_prm, PolType, 1, UsageHelp);
get_commandline_prm(argc, argv, "-ang", str_cmd_prm, anglefile, 1, UsageHelp);
get_commandline_prm(argc, argv, "-ofr", int_cmd_prm, &Off_lig, 1, UsageHelp);
get_commandline_prm(argc, argv, "-ofc", int_cmd_prm, &Off_col, 1, UsageHelp);
get_commandline_prm(argc, argv, "-fnr", int_cmd_prm, &Sub_Nlig, 1, UsageHelp);
get_commandline_prm(argc, argv, "-fnc", int_cmd_prm, &Sub_Ncol, 1, UsageHelp);
get_commandline_prm(argc, argv, "-fr", flt_cmd_prm, &Freq, 1, UsageHelp);
get_commandline_prm(argc, argv, "-un", int_cmd_prm, &Unit, 1, UsageHelp);
get_commandline_prm(argc, argv, "-th1", flt_cmd_prm, &threshold1, 1, UsageHelp);
get_commandline_prm(argc, argv, "-th2", flt_cmd_prm, &threshold2, 1, UsageHelp);
get_commandline_prm(argc, argv, "-errf", str_cmd_prm, file_memerr, 0, UsageHelp);
MemoryAlloc = -1;
get_commandline_prm(argc, argv, "-mem", int_cmd_prm, &MemoryAlloc, 0, UsageHelp);
MemoryAlloc = my_max(MemoryAlloc, 1000);
FlagValid = 0; strcpy(file_valid, "");
get_commandline_prm(argc, argv, "-mask", str_cmd_prm, file_valid, 0, UsageHelp);
if (strcmp(file_valid, "") != 0) FlagValid = 1;
Config = 0;
for (ii = 0; ii < NPolType; ii++) if (strcmp(PolTypeConf[ii], PolType) == 0) Config = 1;
if (Config == 0) edit_error("\nWrong argument in the Polarimetric Data Format\n", UsageHelpDataFormat);
}
if (strcmp(PolType, "S2") == 0) strcpy(PolType, "S2C3");
/********************************************************************
********************************************************************/
check_dir(in_dir);
check_dir(out_dir);
if (FlagValid == 1) check_file(file_valid);
check_file(anglefile);
NwinL = 1; NwinC = 1;
NwinLM1S2 = (NwinL - 1) / 2;
NwinCM1S2 = (NwinC - 1) / 2;
/* INPUT/OUPUT CONFIGURATIONS */
read_config(in_dir, &Nlig, &Ncol, PolarCase, PolarType);
/* POLAR TYPE CONFIGURATION */
PolTypeConfig(PolType, &NpolarIn, PolTypeIn, &NpolarOut, PolTypeOut, PolarType);
file_name_in = matrix_char(NpolarIn, 1024);
/* INPUT/OUTPUT FILE CONFIGURATION */
init_file_name(PolTypeIn, in_dir, file_name_in);
/* INPUT FILE OPENING */
for (Np = 0; Np < NpolarIn; Np++)
if ((in_datafile[Np] = fopen(file_name_in[Np], "rb")) == NULL)
edit_error("Could not open input file : ", file_name_in[Np]);
if (FlagValid == 1)
if ((in_valid = fopen(file_valid, "rb")) == NULL)
edit_error("Could not open input file : ", file_valid);
if ((in_file_angle = fopen(anglefile, "rb")) == NULL)
edit_error("Could not open input file : ", anglefile);
/* OUTPUT FILE OPENING */
sprintf(file_name, "%s%s", out_dir, "oh2004_mv.bin");
if ((out_mv = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_s.bin");
if ((out_s = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_mask_out.bin");
if ((out_maskout = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_mask_in.bin");
if ((out_maskin = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_mask_valid_in_out.bin");
if ((out_maskinout = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
/*
sprintf(file_name, "%s%s", out_dir, "oh2004_mv1.bin");
if ((out_mv1 = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_s1.bin");
if ((out_s1 = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_mv2.bin");
if ((out_mv2 = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_s2.bin");
if ((out_s2 = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
sprintf(file_name, "%s%s", out_dir, "oh2004_mv3.bin");
if ((out_mv = fopen(file_name, "wb")) == NULL)
edit_error("Could not open input file : ", file_name);
*/
/********************************************************************
********************************************************************/
/* MEMORY ALLOCATION */
/*
MemAlloc = NBlockA*Nlig + NBlockB
*/
/* Local Variables */
NBlockA = 0; NBlockB = 0;
/* Mask */
NBlockA += Sub_Ncol; NBlockB += 0;
/* angle = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* shhhh = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* shvhv = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* svvvv = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* mv = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* s = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* maskin = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* maskout = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* maskinout = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* mv_inv1 = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* mv_inv2 = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* mv_inv3 = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* ks_inv1 = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* ks_inv2 = Nlig*Sub_Ncol */
NBlockA += Sub_Ncol; NBlockB += 0;
/* Mavg = NpolarOut*Nlig*Sub_Ncol */
NBlockA += NpolarOut * Sub_Ncol; NBlockB += 0;
/* Reading Data */
NBlockB += Ncol + 2 * Ncol + NpolarIn * 2 * Ncol + NpolarOut * NwinL * (Ncol + NwinC);
memory_alloc(file_memerr, Sub_Nlig, NwinL, &NbBlock, NligBlock, NBlockA, NBlockB, MemoryAlloc);
/********************************************************************
********************************************************************/
/* MATRIX ALLOCATION */
_VC_in = vector_float(2 * Ncol);
_VF_in = vector_float(Ncol);
_MC_in = matrix_float(4, 2 * Ncol);
_MF_in = matrix3d_float(NpolarOut, NwinL, Ncol + NwinC);
/*-----------------------------------------------------------------*/
Valid = matrix_float(NligBlock[0], Sub_Ncol);
M_avg = matrix3d_float(NpolarOut, NligBlock[0], Sub_Ncol);
angle = matrix_float(NligBlock[0], Sub_Ncol);
Shhhh = matrix_float(NligBlock[0], Sub_Ncol);
Shvhv = matrix_float(NligBlock[0], Sub_Ncol);
Svvvv = matrix_float(NligBlock[0], Sub_Ncol);
mv = matrix_float(NligBlock[0], Sub_Ncol);
s = matrix_float(NligBlock[0], Sub_Ncol);
mask_in = matrix_float(NligBlock[0], Sub_Ncol);
mask_out = matrix_float(NligBlock[0], Sub_Ncol);
mask_in_out = matrix_float(NligBlock[0], Sub_Ncol);
mv_inv1 = matrix_float(NligBlock[0], Sub_Ncol);
mv_inv2 = matrix_float(NligBlock[0], Sub_Ncol);
mv_inv3 = matrix_float(NligBlock[0], Sub_Ncol);
ks_inv1 = matrix_float(NligBlock[0], Sub_Ncol);
ks_inv2 = matrix_float(NligBlock[0], Sub_Ncol);
/********************************************************************
********************************************************************/
/* MASK VALID PIXELS (if there is no MaskFile */
if (FlagValid == 0)
for (lig = 0; lig < NligBlock[0]; lig++)
for (col = 0; col < Sub_Ncol; col++)
Valid[lig][col] = 1.;
/********************************************************************
********************************************************************/
/* DATA PROCESSING */
for (Nb = 0; Nb < NbBlock; Nb++) {
if (NbBlock > 2) { printf("%f\r", 100. * Nb / (NbBlock - 1)); fflush(stdout); }
if (FlagValid == 1) read_block_matrix_float(in_valid, Valid, Nb, NbBlock, NligBlock[Nb], Sub_Ncol, 1, 1, Off_lig, Off_col, Ncol);
if (strcmp(PolType, "S2") == 0) {
read_block_S2_avg(in_datafile, M_avg, PolTypeOut, NpolarOut, Nb, NbBlock, NligBlock[Nb], Sub_Ncol, NwinL, NwinC, Off_lig, Off_col, Ncol);
}
else {
/* Case of C,T or I */
read_block_TCI_avg(in_datafile, M_avg, NpolarOut, Nb, NbBlock, NligBlock[Nb], Sub_Ncol, NwinL, NwinC, Off_lig, Off_col, Ncol);
}
if (strcmp(PolTypeOut, "T3") == 0) T3_to_C3(M_avg, NligBlock[Nb], Sub_Ncol, 0, 0);
if (strcmp(PolTypeOut, "T4") == 0) T4_to_C3(M_avg, NligBlock[Nb], Sub_Ncol, 0, 0);
if (strcmp(PolTypeOut, "C4") == 0) C4_to_C3(M_avg, NligBlock[Nb], Sub_Ncol, 0, 0);
read_block_matrix_float(in_file_angle, angle, Nb, NbBlock, NligBlock[Nb], Sub_Ncol, 1, 1, Off_lig, Off_col, Ncol);
for (lig = 0; lig < NligBlock[Nb]; lig++) {
PrintfLine(lig, NligBlock[Nb]);
for (col = 0; col < Sub_Ncol; col++) {
if (Valid[lig][col] == 1.) {
Shhhh[lig][col] = M_avg[C311][lig][col];
Shvhv[lig][col] = M_avg[C322][lig][col] / 2.;
Svvvv[lig][col] = M_avg[C333][lig][col];
if (Unit == 0) angle[lig][col] = angle[lig][col] * pi / 180;
}
else {
Shhhh[lig][col] = 0.;
Shvhv[lig][col] = 0.;
Svvvv[lig][col] = 0.;
}
}
}
oh2004(Valid, angle, NligBlock[Nb], Sub_Ncol, Shhhh, Svvvv, Shvhv, mv, s, mask_out, mask_in, Freq, threshold1, threshold2);
write_block_matrix_float(out_mv, mv, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_s, s, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_maskin, mask_in, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_maskout, mask_out, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
for (lig = 0; lig < NligBlock[Nb]; lig++)
for (col = 0; col < Sub_Ncol; col++)
mask_in_out[lig][col] = mask_in[lig][col] * mask_out[lig][col] * Valid[lig][col];
write_block_matrix_float(out_maskinout, mask_in_out, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
/*
for (lig = 0; lig < NligBlock[Nb]; lig++) {
for (col = 0; col < Sub_Ncol; col++) {
mv_inv1[lig][col] = 100.*mv_inv1[lig][col]; mv_inv2[lig][col] = 100.*mv_inv2[lig][col]; mv_inv3[lig][col] = 100.*mv_inv3[lig][col];
ks_inv1[lig][col]=ks_inv1[lig][col]/(2*pi/(3e8/(Freq*1e9)))*100;
ks_inv2[lig][col]=ks_inv2[lig][col]/(2*pi/(3e8/(Freq*1e9)))*100;
}
}
write_block_matrix_float(out_mv1, mv_inv1, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_s1, ks_inv1, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_mv2, mv_inv2, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_s2, ks_inv2, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
write_block_matrix_float(out_mv3, mv_inv3, NligBlock[Nb], Sub_Ncol, 0, 0, Sub_Ncol);
*/
} // NbBlock
/********************************************************************
********************************************************************/
/* MATRIX FREE-ALLOCATION */
/*
free_matrix_float(Valid, NligBlock[0]);
free_matrix3d_float(M_avg, NpolarOut, NligBlock[0]);
free_matrix_float(angle, NligBlock[0]);
free_matrix_float(Shhhh, NligBlock[0]);
free_matrix_float(Shvhv, NligBlock[0]);
free_matrix_float(Svvvv, NligBlock[0]);
free_matrix_float(mv, NligBlock[0]);
free_matrix_float(s, NligBlock[0]);
free_matrix_float(mask_in, NligBlock[0]);
free_matrix_float(mask_out, NligBlock[0]);
free_matrix_float(mv_inv1, NligBlock[0]);
free_matrix_float(mv_inv2, NligBlock[0]);
free_matrix_float(mv_inv3, NligBlock[0]);
free_matrix_float(ks_inv1, NligBlock[0]);
free_matrix_float(ks_inv2, NligBlock[0]);
*/
/********************************************************************
********************************************************************/
/* INPUT FILE CLOSING*/
for (Np = 0; Np < NpolarIn; Np++) fclose(in_datafile[Np]);
if (FlagValid == 1) fclose(in_valid);
/* OUTPUT FILE CLOSING*/
fclose(out_mv); fclose(out_s);
fclose(out_maskin); fclose(out_maskout); fclose(in_file_angle);
/********************************************************************
********************************************************************/
return 1;
}
/*******************************************************************************
*******************************************************************************/
void oh2004(float** valid, float** theta, int Nlig, int Ncol, float** Shhhh, float** Svvvv, float** Shvhv, float** mv_oh, float** s_oh, float** msk_out, float** msk_valid, float Freq, float thres1, float thres2)
/* Modele d'inversion de Oh
% theta : angle incidence radar en radians
% Shhhh : coeff retrodiff HH
% Svvvv : coeff retrodiff VV
% Shvhv : coeff retrodiff HV
% mv_oh : volumetric moisture
% s_oh : surface rms heigth en centimeter
% Freq : central frequency en GHz */
{
int ii, jj, tt;
float xx;
float f, p_max;
float mv_inv, ks_inv, G, G1;
int msk_mv, msk_ks, a, b, c, m, n;
for (ii = 0; ii < Nlig; ii++) {
PrintfLine(ii, Nlig);
for (jj = 0; jj < Ncol; jj++) {
if (valid[ii][jj] == 1.) {
f = Freq * 1e9;
p_max = 1 - exp(0.35 * log(theta[ii][jj] / (pi / 2)) * pow(thres1, -0.65)) * exp(-0.4 * pow((2 * pi / (3e8 / f) * thres2), 1.4));
if ((Shhhh[ii][jj] / Svvvv[ii][jj]) < p_max) {
msk_valid[ii][jj] = 1;
/* Computation of moisture content 1 */
mv_inv = 0.5;
for (tt = 0; tt < 20; tt++) {
xx = 1. - Shvhv[ii][jj] / (0.11 * pow(mv_inv, 0.7) * pow(cos(theta[ii][jj]), 2.2));
if (xx <= 0) {
mv_inv = 0; break;
}
else {
xx = -3.125 * log(xx);
if ((mv_inv <= 0) || (xx <= 0)) {
mv_inv = 0; break;
}
else {
G = (1 - exp(0.35 * log(theta[ii][jj] / (pi / 2)) * pow(mv_inv, -0.65)) * exp(-0.4 * pow(xx, 0.556 * 1.4)) - Shhhh[ii][jj] / Svvvv[ii][jj]);
G1 = -exp(0.35 * log(theta[ii][jj] / (pi / 2)) * pow(mv_inv, -0.65)) * log(theta[ii][jj] / (pi / 2)) * 0.35 * (-0.65) * pow(mv_inv, -1.65) * exp(-0.4 * pow(xx, 0.556 * 1.4));
G1 = G1 - exp(0.35 * log(theta[ii][jj] / (pi / 2)) * pow(mv_inv, -0.65)) * exp(-0.4 * pow(xx, 0.556 * 1.4)) * (-0.4) * 0.556 * 1.4 * pow(xx, 0.556 * 1.4 - 1) * (-3.125) / (1 - Shvhv[ii][jj] / (0.11 * pow(mv_inv, 0.7) * pow(cos(theta[ii][jj]), 2.2))) * 0.7 * Shvhv[ii][jj] / 0.11 / pow(cos(theta[ii][jj]), 2.2) * pow(mv_inv, -1.7);
if (abs(G / G1) < 1e-10) {
mv_inv = mv_inv; break;
}
else {
if (G1 != 0) mv_inv = mv_inv - (G / G1);
else continue;
}
}
}
}
mv_inv1[ii][jj] = mv_inv;
/* Computation of rms height 1 */
if (mv_inv == 0) ks_inv1[ii][jj] = 0;
else {
xx = 1. - Shvhv[ii][jj] / (0.11 * pow(mv_inv1[ii][jj], 0.7) * pow(cos(theta[ii][jj]), 2.2));
if (xx <= 0) ks_inv1[ii][jj] = 0;
else {
xx = -3.125 * log(xx);
if (xx <= 0) ks_inv1[ii][jj] = 0;
else ks_inv1[ii][jj] = pow(xx, 0.556);
}
}
/* Computation of rms height 2 */
xx = 1. - (Shvhv[ii][jj] / Svvvv[ii][jj]) / (0.095 * pow(0.13 + sin(1.5 * theta[ii][jj]), 1.4));
if (xx <= 0) ks_inv2[ii][jj] = 0;
else {
xx = log(xx) / (-1.3);
ks_inv2[ii][jj] = pow(xx, 10. / 9.);
}
/* Computation of moisture content 2 */
if (ks_inv2[ii][jj] == 0) mv_inv2[ii][jj] = 0;
else {
xx = (1 - Shhhh[ii][jj] / Svvvv[ii][jj]) / exp(-0.4 * pow(ks_inv2[ii][jj], 1.4));
if (xx <= 0) mv_inv2[ii][jj] = 0;
else {
xx = log(xx) / (0.35 * log(theta[ii][jj] / (pi / 2)));
mv_inv2[ii][jj] = pow(xx, -100. / 65.);
}
}
/* Computation of moisture content 3 */
if (ks_inv2[ii][jj] == 0) mv_inv3[ii][jj] = 0;
else {
xx = Shvhv[ii][jj] / (0.11 * pow(cos(theta[ii][jj]), 2.2) * (1 - exp(-0.32 * pow(ks_inv2[ii][jj], 1.8))));
if (xx <= 0) mv_inv3[ii][jj] = 0;
else mv_inv3[ii][jj] = pow(xx, 10. / 7.);
}
/* Average rms height and moisture content */
if (mv_inv1[ii][jj] == 0) a = 0;
else a = 1;
if (mv_inv2[ii][jj] == 0) b = 0;
else b = 1;
if (mv_inv3[ii][jj] == 0) c = 0;
else c = 1;
if ((a == 0) && (b == 0) && (c == 0)) mv_inv = 0;
else mv_inv = (a * mv_inv1[ii][jj] + b * mv_inv2[ii][jj] + c * mv_inv3[ii][jj]) / (a + b + c);
if (ks_inv1[ii][jj] == 0) m = 0;
else m = 1;
if (ks_inv2[ii][jj] == 0) n = 0;
else n = 1;
if ((m == 0) && (n == 0)) ks_inv = 0;
else ks_inv = (m * ks_inv1[ii][jj] + 0.25 * n * ks_inv2[ii][jj]) / (m + 0.25 * n);
if (mv_inv >= 0.4 || mv_inv <= 0) msk_mv = 0;
else msk_mv = 1;
if (ks_inv >= 3.5 || ks_inv <= 0) msk_ks = 0;
else msk_ks = 1;
msk_out[ii][jj] = msk_mv * msk_ks;
mv_oh[ii][jj] = mv_inv * msk_out[ii][jj] * 100.;
s_oh[ii][jj] = ks_inv * msk_out[ii][jj] / (2 * pi / (3e8 / f)) * 100.;
}
else {
msk_valid[ii][jj] = 0;
s_oh[ii][jj] = 0;
mv_oh[ii][jj] = 0;
msk_out[ii][jj] = 0;
}
}
else {
msk_valid[ii][jj] = 0;
s_oh[ii][jj] = 0;
mv_oh[ii][jj] = 0;
msk_out[ii][jj] = 0;
}
}
}
}

View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3112FCA4-990C-4DB8-9C53-A568C968EA7F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>testpolsarpro50</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>surface_inversion_oh2004</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard_C>stdc11</LanguageStandard_C>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="alos_ceos.h" />
<ClInclude Include="alos_header.h" />
<ClInclude Include="graphics.h" />
<ClInclude Include="idan.h" />
<ClInclude Include="idan_lib.h" />
<ClInclude Include="matrix.h" />
<ClInclude Include="my_utils.h" />
<ClInclude Include="PolSARproLib.h" />
<ClInclude Include="processing.h" />
<ClInclude Include="rasterfile.h" />
<ClInclude Include="sirc_ceos.h" />
<ClInclude Include="sirc_header.h" />
<ClInclude Include="statistics.h" />
<ClInclude Include="sub_aperture.h" />
<ClInclude Include="util.h" />
<ClInclude Include="util_block.h" />
<ClInclude Include="util_convert.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="graphics.c" />
<ClCompile Include="matrix.c" />
<ClCompile Include="my_utils.c" />
<ClCompile Include="processing.c" />
<ClCompile Include="statistics.c" />
<ClCompile Include="sub_aperture.c" />
<ClCompile Include="surface_inversion_oh2004.c" />
<ClCompile Include="util.c" />
<ClCompile Include="util_block.c" />
<ClCompile Include="util_convert.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="alos_header.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="graphics.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="idan.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="idan_lib.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="matrix.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="my_utils.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="PolSARproLib.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="processing.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="statistics.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="util.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="util_block.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="util_convert.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="alos_ceos.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sub_aperture.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="rasterfile.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sirc_ceos.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sirc_header.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="graphics.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="matrix.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="my_utils.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="processing.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="statistics.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="surface_inversion_oh2004.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="util.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="util_block.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="util_convert.c">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="sub_aperture.c">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommandArguments>-id E:\data\kongtianyuan\TempData\lee_filter\ -od E:\data\kongtianyuan\0h2004\ -iodf T3 -ang E:\data\kongtianyuan\TempData\incidence.dat -ofr 0 -ofc 0 -fnr 8064 -fnc 7086 -fr 5.400011852225445 -un 0 -th1 1.0 -th2 7.0</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-id E:\data\kongtianyuan\TempData\lee_filter\ -od E:\data\kongtianyuan\0h2004\ -iodf T3 -ang E:\data\kongtianyuan\TempData\incidence.dat -ofr 0 -ofc 0 -fnr 8064 -fnc 7086 -fr 5.400011852225445 -un 0 -th1 1.0 -th2 7.0</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,401 @@
/********************************************************************
PolSARpro v4.0 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 (1991) of
the License, or any later version. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details
*********************************************************************
File : util.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER, Laurent FERRO-FAMIL
Version : 2.0
Creation : 09/2003
Update : 01/2010
*--------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Image and Remote Sensing Group
SAPHIR Team
(SAr Polarimetry Holography Interferometry Radargrammetry)
UNIVERSITY OF RENNES I
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail: eric.pottier@univ-rennes1.fr
laurent.ferro-famil@univ-rennes1.fr
*--------------------------------------------------------------------
Description : UTIL Routines
*--------------------------------------------------------------------
Routines :
struct Pix
struct Pix *Create_Pix(struct Pix *P, float x,float y);
struct Pix *Remove_Pix(struct Pix *P_top, struct Pix *P);
float my_round(float v);
void edit_error(char *s1,char *s2)
void check_file(char *file);
void check_dir(char *dir);
void read_config(char *dir, int *Nlig, int *Ncol, char *PolarCase, char *PolarType);
void write_config(char *dir, int Nlig, int Ncol, char *PolarCase, char *PolarType);
void my_randomize (void);
float my_random (float num);
float my_eps_random (void);
struct cplx;
cplx cadd(cplx a,cplx b);
cplx csub(cplx a,cplx b);
cplx cmul(cplx a,cplx b);
cplx cdiv(cplx a,cplx b);
cplx cpwr(cplx a,float b);
cplx cconj(cplx a);
float cimg(cplx a);
float crel(cplx a);
float cmod(cplx a);
float cmod2(cplx a);
float angle(cplx a);
cplx cplx_sinc(cplx a);
int PolTypeConfig(char *PolType, int *NpolarIn, char *PolTypeIn, int *NpolarOut, char *PolTypeOut, char *PolarType);
int init_file_name(char *PolType, char *Dir, char **FileName);
int memory_alloc(char *filememerr, int Nlig, int Nwin, int *NbBlock, int *NligBlock, int NBlockA, int NBlockB, int MemoryAlloc);
int PrintfLine(int lig, int NNlig);
int CreateUsageHelpDataFormat(char *PolTypeConf);
int CreateUsageHelpDataFormatInput(char *PolTypeConf);
int init_matrix_block(int NNcol, int NNpolar, int NNwinLig, int NNwinCol);
int block_alloc(int *NNligBlock, int SSubSampLig, int NNLookLig, int SSub_Nlig, int *NNbBlock);
********************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagUtil
#define FlagUtil
#define eps 1.E-30
#define pi 3.14159265358979323846
#define M_C 299792458
#define INIT_MINMAX 1.E+30
#define DATA_NULL 9999999.99
#define FilePathLength 1024
/*******************************************************************/
/* Common Variables */
/* S2 matrix */
#define s11 0
#define s12 1
#define s21 2
#define s22 3
/* IPP Full */
#define I411 0
#define I412 1
#define I421 2
#define I422 3
/* IPP pp4 */
#define I311 0
#define I312 1
#define I322 2
/* IPP pp5-pp6-pp7 */
#define I211 0
#define I212 1
/* C2 matrix */
#define C211 0
#define C212_re 1
#define C212_im 2
#define C222 3
/* C3 matrix */
#define C311 0
#define C312_re 1
#define C312_im 2
#define C313_re 3
#define C313_im 4
#define C322 5
#define C323_re 6
#define C323_im 7
#define C333 8
/* C4 matrix */
#define C411 0
#define C412_re 1
#define C412_im 2
#define C413_re 3
#define C413_im 4
#define C414_re 5
#define C414_im 6
#define C422 7
#define C423_re 8
#define C423_im 9
#define C424_re 10
#define C424_im 11
#define C433 12
#define C434_re 13
#define C434_im 14
#define C444 15
/* T2 matrix */
#define T211 0
#define T212_re 1
#define T212_im 2
#define T222 3
/* T3 matrix */
#define T311 0
#define T312_re 1
#define T312_im 2
#define T313_re 3
#define T313_im 4
#define T322 5
#define T323_re 6
#define T323_im 7
#define T333 8
/* T4 matrix */
#define T411 0
#define T412_re 1
#define T412_im 2
#define T413_re 3
#define T413_im 4
#define T414_re 5
#define T414_im 6
#define T422 7
#define T423_re 8
#define T423_im 9
#define T424_re 10
#define T424_im 11
#define T433 12
#define T434_re 13
#define T434_im 14
#define T444 15
/* C2 or T2 matrix */
#define X211 0
#define X212_re 1
#define X212_im 2
#define X222 3
#define X212 4
/* C3 or T3 matrix */
#define X311 0
#define X312_re 1
#define X312_im 2
#define X313_re 3
#define X313_im 4
#define X322 5
#define X323_re 6
#define X323_im 7
#define X333 8
#define X312 9
#define X313 10
#define X323 11
/* C4 or T4 matrix */
#define X411 0
#define X412_re 1
#define X412_im 2
#define X413_re 3
#define X413_im 4
#define X414_re 5
#define X414_im 6
#define X422 7
#define X423_re 8
#define X423_im 9
#define X424_re 10
#define X424_im 11
#define X433 12
#define X434_re 13
#define X434_im 14
#define X444 15
#define X412 16
#define X413 17
#define X414 18
#define X423 19
#define X424 20
#define X434 21
/* T6 matrix */
#define T611 0
#define T612_re 1
#define T612_im 2
#define T613_re 3
#define T613_im 4
#define T614_re 5
#define T614_im 6
#define T615_re 7
#define T615_im 8
#define T616_re 9
#define T616_im 10
#define T622 11
#define T623_re 12
#define T623_im 13
#define T624_re 14
#define T624_im 15
#define T625_re 16
#define T625_im 17
#define T626_re 18
#define T626_im 19
#define T633 20
#define T634_re 21
#define T634_im 22
#define T635_re 23
#define T635_im 24
#define T636_re 25
#define T636_im 26
#define T644 27
#define T645_re 28
#define T645_im 29
#define T646_re 30
#define T646_im 31
#define T655 32
#define T656_re 33
#define T656_im 34
#define T666 35
/*******************************************************************/
/* Return nonzero value if X is not +-Inf or NaN. */
#define my_isfinite(x) ((x == x && (x - x == 0.0)) ? 1 : 0)
/*******************************************************************/
/* Common Variables */
FILE *in_datafile[FilePathLength];
FILE *in_datafile1[FilePathLength];
FILE *in_datafile2[FilePathLength];
FILE *in_datafile3[FilePathLength];
FILE *out_datafile[FilePathLength];
FILE *out_datafile1[FilePathLength];
FILE *out_datafile2[FilePathLength];
FILE *out_datafile3[FilePathLength];
FILE *out_datafile4[FilePathLength];
FILE *in_valid;
FILE *tmp_datafile[FilePathLength];
char in_dir[FilePathLength], out_dir[FilePathLength];
char in_dir1[FilePathLength], in_dir2[FilePathLength], in_dir3[FilePathLength];
char out_dir1[FilePathLength], out_dir2[FilePathLength];
char out_dir3[FilePathLength], out_dir4[FilePathLength];
char tmp_dir[FilePathLength];
char PolarCase[20], PolarType[20];
char PolType[20], PolTypeIn[20], PolTypeOut[20];
char file_valid[FilePathLength];
char file_memerr[FilePathLength];
char **file_name_in;
char **file_name_in1;
char **file_name_in2;
char **file_name_in3;
char **file_name_out;
char **file_name_out1, **file_name_out2;
char **file_name_out3, **file_name_out4;
char **file_name_tmp;
char UsageHelp[2048];
char UsageHelpDataFormat[8192];
int NligBlock[FilePathLength];
int Nlig, Ncol;
int Off_lig, Off_col;
int Sub_Nlig, Sub_Ncol;
int Nwin, NwinM1S2;
int NwinL, NwinLM1S2;
int NwinC, NwinCM1S2;
int Np, NpolarIn, NpolarOut;
int Nb, NbBlock, NBlockA, NBlockB, MemoryAlloc;
int FlagValid;
int NcolBMP, ExtraColBMP, IntCharBMP;
float **Valid;
float Nvalid;
float span;
float k1r, k1i, k2r, k2i, k3r, k3i, k4r, k4i;
/* Global Matrix used in util_block.c */
float *_VC_in;
float *_VF_in;
int *_VI_in;
float **_MC_in;
float **_MC1_in;
float **_MC2_in;
float ***_MF_in;
/*******************************************************************/
struct Pix
{
float x;
float y;
struct Pix *next;
};
struct Pix *Create_Pix (struct Pix *P, float x, float y);
struct Pix *Remove_Pix (struct Pix *P_top, struct Pix *P);
float my_round (float v);
void edit_error (char *s1, char *s2);
void check_file (char *file);
void check_dir (char *dir);
void read_config (char *dir, int *Nlig, int *Ncol, char *PolarCase, char *PolarType);
void write_config (char *dir, int Nlig, int Ncol, char *PolarCase, char *PolarType);
void my_randomize (void);
float my_random (float num);
float my_eps_random (void);
typedef struct
{
float re;
float im;
}cplx;
cplx cadd(cplx a,cplx b);
cplx csub(cplx a,cplx b);
cplx cmul(cplx a,cplx b);
cplx cdiv(cplx a,cplx b);
cplx cpwr(cplx a,float b);
cplx cconj(cplx a);
float cimg(cplx a);
float crel(cplx a);
float cmod(cplx a);
float cmod2(cplx a);
float angle(cplx a);
cplx cplx_sinc(cplx a);
int PolTypeConfig(char *PolType, int *NpolarIn, char *PolTypeIn, int *NpolarOut, char *PolTypeOut, char *PolarType);
int init_file_name(char *PolType, char *Dir, char **FileName);
int memory_alloc(char *filememerr, int Nlig, int Nwin, int *NbBlock, int *NligBlock, int NBlockA, int NBlockB, int MemAlloc);
int PrintfLine(int lig, int NNlig);
int CreateUsageHelpDataFormat(char *PolTypeConf);
int CreateUsageHelpDataFormatInput(char *PolTypeConf);
int init_matrix_block(int NNcol, int NNpolar, int NNwinLig, int NNwinCol);
int block_alloc(int *NNligBlock, int SSubSampLig, int NNLookLig, int SSub_Nlig, int *NNbBlock);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,133 @@
/********************************************************************
PolSARpro v4.0 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 (1991) of
the License, or any later version. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details
*********************************************************************
File : util_block.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER
Version : 1.0
Creation : 08/2010
Update :
*--------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Image and Remote Sensing Group
SAPHIR Team
(SAr Polarimetry Holography Interferometry Radargrammetry)
UNIVERSITY OF RENNES I
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail: eric.pottier@univ-rennes1.fr
laurent.ferro-famil@univ-rennes1.fr
*--------------------------------------------------------------------
Description : UTIL Routines for Block Data Reading and Writing
*--------------------------------------------------------------------
Routines :
int read_matrix_int(char *file_name, int **M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int read_matrix_float(char *file_name, float **M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int read_matrix_cmplx(char *file_name, float **M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int write_matrix_int(char *file_name, int **M_out, int NNlig, int NNcol, int OOffLig, int OOffCol);
int write_matrix_float(char *file_name, float **M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int write_matrix_cmplx(char *file_name, float **M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int read_matrix3d_float(int NNpolar, char **file_name, float ***M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int read_matrix3d_cmplx(int NNpolar, char **file_name, float ***M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int write_matrix3d_float(int NNpolar, char **file_name, float ***M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int write_matrix3d_cmplx(int NNpolar, char **file_name, float ***M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int read_block_matrix_int(FILE *in_file, int **M_in, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_matrix_float(FILE *in_file, float **M_in, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_matrix_matrix3d_float(FILE *in_file, float ***M_in, int NNp, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_matrix_cmplx(FILE *in_file, float **M_in, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int write_block_matrix_int(FILE *outfile, int **M_out, int Sub_NNlig, int Sub_NNcol, int OOffLig, int OOffCol, int NNcol);
int write_block_matrix_float(FILE *outfile, float **M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int write_block_matrix_matrix3d_float(FILE *out_file, float ***M_out, int NNp, int Sub_NNlig, int Sub_NNcol, int OOffLig, int OOffCol, int NNcol);
int write_block_matrix_cmplx(FILE *outfile, float **M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int write_block_matrix3d_float(FILE *datafile[], int NNpolar, float ***M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int write_block_matrix3d_cmplx(FILE *datafile[], int NNpolar, float ***M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int read_block_S2_avg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_S2_noavg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_S2T6_avg(FILE *datafile1[], FILE *datafile2[], float ***M_out, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_SPP_avg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_SPP_noavg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_TCI_avg(FILE *datafile[], float ***M_out, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_TCI_noavg(FILE *datafile[], float ***M_out, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_S2_TCIelt_noavg(FILE *datafile[], float **M_out, char *PolType, int NNp, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol)
int read_block_SPP_TCIelt_noavg(FILE *datafile[], float **M_out, char *PolType, int NNp, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol)
********************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagUtilBlock
#define FlagUtilBlock
/*******************************************************************/
int read_matrix_int(char *file_name, int **M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int read_matrix_float(char *file_name, float **M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int read_matrix_cmplx(char *file_name, float **M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int write_matrix_int(char *file_name, int **M_out, int NNlig, int NNcol, int OOffLig, int OOffCol);
int write_matrix_float(char *file_name, float **M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int write_matrix_cmplx(char *file_name, float **M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int read_matrix3d_float(int NNpolar, char **file_name, float ***M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int read_matrix3d_cmplx(int NNpolar, char **file_name, float ***M_in, int NNlig, int NNcol, int NNwinLig, int NNwinCol);
int write_matrix3d_float(int NNpolar, char **file_name, float ***M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int write_matrix3d_cmplx(int NNpolar, char **file_name, float ***M_out, int NNlig, int NNcol, int OffLig, int OffCol);
int read_block_matrix_int(FILE *in_file, int **M_in, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_matrix_float(FILE *in_file, float **M_in, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_matrix_matrix3d_float(FILE *in_file, float ***M_in, int NNp, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_matrix_cmplx(FILE *in_file, float **M_in, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int write_block_matrix_int(FILE *outfile, int **M_out, int Sub_NNlig, int Sub_NNcol, int OOffLig, int OOffCol, int NNcol);
int write_block_matrix_float(FILE *outfile, float **M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int write_block_matrix_matrix3d_float(FILE *out_file, float ***M_out, int NNp, int Sub_NNlig, int Sub_NNcol, int OOffLig, int OOffCol, int NNcol);
int write_block_matrix_cmplx(FILE *outfile, float **M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int write_block_matrix3d_float(FILE *datafile[], int NNpolar, float ***M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int write_block_matrix3d_cmplx(FILE *datafile[], int NNpolar, float ***M_out, int Sub_NNlig, int Sub_NNcol, int OffLig, int OffCol, int NNcol);
int read_block_S2_avg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_S2_noavg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_S2T6_avg(FILE *datafile1[], FILE *datafile2[], float ***M_out, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_SPP_avg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_SPP_noavg(FILE *datafile[], float ***M_out, char *PolType, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_TCI_avg(FILE *datafile[], float ***M_out, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_TCI_noavg(FILE *datafile[], float ***M_out, int NNpolar, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_S2_TCIelt_noavg(FILE *datafile[], float **M_out, char *PolType, int NNp, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
int read_block_SPP_TCIelt_noavg(FILE *datafile[], float **M_out, char *PolType, int NNp, int NNblock, int NNbBlock, int Sub_NNlig, int Sub_NNcol, int NNwinLig, int NNwinCol, int OOff_lig, int OOff_col, int NNcol);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,151 @@
/********************************************************************
PolSARpro v4.0 is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 (1991) of
the License, or any later version. This program is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
See the GNU General Public License (Version 2, 1991) for more details
*********************************************************************
File : util_convert.h
Project : ESA_POLSARPRO
Authors : Eric POTTIER
Version : 1.0
Creation : 08/2010
Update :
*--------------------------------------------------------------------
INSTITUT D'ELECTRONIQUE et de TELECOMMUNICATIONS de RENNES (I.E.T.R)
UMR CNRS 6164
Image and Remote Sensing Group
SAPHIR Team
(SAr Polarimetry Holography Interferometry Radargrammetry)
UNIVERSITY OF RENNES I
Bât. 11D - Campus de Beaulieu
263 Avenue Général Leclerc
35042 RENNES Cedex
Tel :(+33) 2 23 23 57 63
Fax :(+33) 2 23 23 69 63
e-mail: eric.pottier@univ-rennes1.fr
laurent.ferro-famil@univ-rennes1.fr
*--------------------------------------------------------------------
Description : UTIL Routines for Polarimetric Data Convert
*--------------------------------------------------------------------
Routines :
int S2_to_C3elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C4elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T3elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T4elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T6elt(int Np, float ***S_in1, float ***S_in2, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_C2elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_T2elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_SPP(float ***S_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_IPP(float ***S_in, float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C2(float ***S_in, float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C3(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C4(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T2(float ***S_in, float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T3(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T4(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T6(float ***S_in1, float ***S_in2, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_C2(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_T2(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_IPP(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_T4(float ***S_in1, float ***S_in2, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C2_to_IPP(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C2_to_T2(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T2_to_C2(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_T4(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_C3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_T3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_C2(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_IPP(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T4_to_C4(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T4_to_C3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T4_to_T3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C3_to_T3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C3_to_C2(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C3_to_IPP(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T3_to_C3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T6_to_C3(float ***M_in, int MasterSlave, int Nlig, int Ncol, int NwinLig, int NwinCol);
********************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <dos.h>
#include <conio.h>
#endif
#ifndef FlagUtilConvert
#define FlagUtilConvert
/*******************************************************************/
int S2_to_C3elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C4elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T3elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T4elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T6elt(int Np, float ***S_in1, float ***S_in2, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_C2elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_T2elt(int Np, float ***S_in, float **M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_SPP(float ***S_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_IPP(float ***S_in, float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C2(float ***S_in, float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C3(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_C4(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T2(float ***S_in, float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T3(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T4(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int S2_to_T6(float ***S_in1, float ***S_in2, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_C2(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_T2(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_IPP(float ***S_in, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int SPP_to_T4(float ***S_in1, float ***S_in2, float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C2_to_IPP(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C2_to_T2(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T2_to_C2(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_T4(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_C3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_T3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_C2(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C4_to_IPP(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T4_to_C4(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T4_to_C3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T4_to_T3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C3_to_T3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C3_to_C2(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int C3_to_IPP(float ***M_in, int pp, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T3_to_C3(float ***M_in, int Nlig, int Ncol, int NwinLig, int NwinCol);
int T6_to_C3(float ***M_in, int MasterSlave, int Nlig, int Ncol, int NwinLig, int NwinCol);
#endif

View File

@ -0,0 +1,752 @@
; Menu file for Windows gnuplot
; Roger Hadgraft, 26-5-92
; Russell Lang, 30 Nov 1992
; Modified for 4.0, John Bollinger, 31 Dec 2002
[Menu]
&File
&Open ...
load '[OPEN]load[EOS]*.plt[EOS]'{ENTER}
&Save ...
save '[SAVE]save[EOS]*.plt[EOS]'{ENTER}
&Demos ...
load '[OPEN]load[EOS]*.dem[EOS]'{ENTER}
--
&Change Directory ...
cd '[DIRECTORY]New directory?[EOS]'{ENTER}
show Current &Directory
pwd{ENTER}
--
O&utput ...
set output "[INPUT]Output filename?[EOS]"{ENTER}
&Printer Output
set output "PRN"{ENTER}
&Window Output
set output{ENTER}set terminal win{ENTER}
Show Output
show output{ENTER}
Ou&tput Device ...
set terminal [INPUT]Terminal type?{ENTER}
Show Output Devices
set terminal{ENTER}show terminal{ENTER}
--
[Menu]
History
Previous command ^P
{^P}
Next command ^N
{^N}
--
Back one character ^B
{^B}
Forward one character ^F
{^F}
--
Beginning of the line ^A
{^A}
End of the line ^E
{^E}
--
Delete previous character ^H
{^H}
Delete current character ^D
{^D}
Delete last word ^W
{^W}
Delete to end of line ^K
{^K}
Delete entire line ^U
{^U}
--
Redraw the line ^L
{^L}
[EndMenu]
open DOS window
shell{ENTER}
run DOS command ...
![INPUT]DOS command?{ENTER}
--
E&xit
quit{ENTER}
[EndMenu]
[Menu]
&Plot
Plot
plot
3D Plot
splot
Replot
replot{ENTER}
Clear device
clear{ENTER}
--
Simple Range
[[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS]
Named Range
[[INPUT]Variable name?[EOS]=[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS]
--
Data filename ...
'[OPEN]Open[EOS]*.dat[EOS]' [EOS]
using x,y columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS] [EOS]
using x,y,ydelta columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ydelta column?[EOS] [EOS]
using x,y,ylow,yhigh columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ylow column?[EOS]:[INPUT]Yhigh column?[EOS] [EOS]
--
[Menu]
with Style (simple)
Lines
with lines
Points
with points
Lines and Points
with linespoints
Impulses
with impulses
Dots
with dots
Steps
with steps
Fsteps
with fsteps
Histeps
with histeps
[EndMenu]
[Menu]
with Style (compound)
Error Bars
with errorbars
X Error Bars
with xerrorbars
Y Error Bars
with yerrorbars
XY Error Bars
with xyerrorbars
Error Lines
with errorlines
X Error Lines
with xerrorlines
Y Error Lines
with yerrorlines
XY Error Lines
with xyerrorlines
Boxes
with boxes
Filled Curves
with filledcurves
Box Error Bars
with boxerrorbars
Box XY Error Bars
with boxxyerrorbars
Finance Bars
with financebars
Candlesticks
with candlesticks
[EndMenu]
[EndMenu]
[Menu]
&Expressions
Evaluate
print
Complex number ...
{[INPUT]Real part?[EOS],[INPUT]Imaginary part?[EOS]}
[Menu]
Unary
Minus -a
-[INPUT]Arg
Plus +a
+[INPUT]Arg
One's compliment ~a
~[INPUT]Arg
Logcial negation !a
![INPUT]Arg
Factorial a!
[INPUT]Arg[EOS]!
[EndMenu]
[Menu]
Binary
Exponentiation **
**
Multiply *
*
Divide /
/
Add +
+
Subtract -
-
--
Modulo %
%
[EndMenu]
[Menu]
Logical
Equality ==
==
Inequality !=
!=
--
less than <
<
less than or equal <=
<=
greater than >
>
greater than or equal >=
>=
--
Bitwise AND &
&
Bitwise exclusive OR ^
^
Bitwise inclusive OR |
|
--
Logical AND &&
&&
Logical OR ||
||
--
Ternary operator a?b:c
[INPUT]First arg[EOS]?[INPUT]Second arg[EOS]:[INPUT]Third arg[EOS]
[EndMenu]
[EndMenu]
[Menu]
Fu&nctions
[Menu]
Elementary
random number
rand([INPUT]Argument[EOS])
absolute value
abs([INPUT]Argument[EOS])
sign
sgn([INPUT]Argument[EOS])
--
ceiling
ceil([INPUT]Argument[EOS])
floor
floor([INPUT]Argument[EOS])
integer
int([INPUT]Argument[EOS])
--
square root
sqrt([INPUT]Argument[EOS])
exponent
exp([INPUT]Argument[EOS])
logarithm (e)
log([INPUT]Argument[EOS])
logarithm (10)
log10([INPUT]Argument[EOS])
--
cosine
cos([INPUT]Argument[EOS])
sine
sin([INPUT]Argument[EOS])
tangent
tan([INPUT]Argument[EOS])
--
arc cosine
acos([INPUT]Argument[EOS])
arc sine
asin([INPUT]Argument[EOS])
arc tangent
atan([INPUT]Argument[EOS])
arc tangent 2
atan2([INPUT]Argument[EOS])
--
hyperbolic cosine
cosh([INPUT]Argument[EOS])
hyperbolic sine
sinh([INPUT]Argument[EOS])
hyperbolic tangent
tanh([INPUT]Argument[EOS])
--
imaginary
imag([INPUT]Argument[EOS])
real
real([INPUT]Argument[EOS])
arg
arg([INPUT]Argument[EOS])
[EndMenu]
[Menu]
Special
error
erf([INPUT]Argument[EOS])
error c
erfc([INPUT]Argument[EOS])
inv error
inverf([INPUT]Argument[EOS])
--
gamma
gamma([INPUT]Argument[EOS])
igamma
igamma([INPUT]First argument[EOS],[INPUT]Second argument[EOS])
lgamma
lgamma([INPUT]Argument[EOS])
--
ibeta
ibeta([INPUT]First argument[EOS],[INPUT]Second argument[EOS],[INPUT]Third argument[EOS])
--
bessel j0
besj0([INPUT]Argument[EOS])
bessel j1
besj1([INPUT]Argument[EOS])
bessel y0
besy0([INPUT]Argument[EOS])
bessel y1
besy1([INPUT]Argument[EOS])
--
lambertw
lambertw([INPUT]Argument[EOS])
[EndMenu]
[Menu]
Statistical
normal
norm([INPUT]Argument[EOS])
inverse normal
invnorm([INPUT]Argument[EOS])
[EndMenu]
--
Define User Function ...
[INPUT]Name for function?[EOS][INPUT]Variable/s, eg. (a,b) ?[EOS]=
Show User Functions
show functions{ENTER}
--
Define User Variable ...
[INPUT]Name for variable?[EOS]=[INPUT]Value, eg. 9.81 ?{ENTER}
Show User Variables
show variables{ENTER}
--
x Dummy variable
set dummy [INPUT]Variable name?{ENTER}
x,y Dummy variables
set dummy [INPUT]Variable names (eg. u,v)?{ENTER}
Show Dummy variables
show dummy{ENTER}
[EndMenu]
[Menu]
&General
Border on
set border{ENTER}
Border off
unset border{ENTER}
Show Border
show border{ENTER}
--
Box width
set boxwidth [INPUT]Box Width?{ENTER}
Auto Box Width
set boxwidth{ENTER}
Show Box width
show boxwidth{ENTER}
--
Show Line Types
test{ENTER}
--
[Menu]
Parametric
Set Parametric
set parametric{ENTER}
Not Parametric
unset parametric{ENTER}
Show Parametric
show parametric{ENTER}
--
t Range
set trange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
u Range
set urange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
v Range
set vrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
[EndMenu]
--
[Menu]
Clipping
Clip near points
set clip points{ENTER}
Clip one point
set clip one{ENTER}
Clip two points
set clip two{ENTER}
No Clipping
unset clip{ENTER}
Show Clip type
show clip{ENTER}
[EndMenu]
--
[Menu]
Polar
Polar
set polar{ENTER}
Not Polar
unset polar{ENTER}
Show Polar
show polar{ENTER}
Radial Range
set rrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Angles in Degrees
set angles degrees{ENTER}
Angles in Radians
set angles radians{ENTER}
Show Angle units
show angles{ENTER}
[EndMenu]
--
Set Plot Size
set size [INPUT]Xscale?[EOS],[INPUT]Yscale?{ENTER}
Show Plot Size
show size{ENTER}
--
Sampling Rate
set sample [INPUT]Sampling rate (default=100)?{ENTER}
Show Sampling Rate
show sample{ENTER}
[EndMenu]
[Menu]
&Axes
Autoscale xy
set autoscale [INPUT]Which axes (eg. xy)?{ENTER}
No Autoscale xy
unset autoscale [INPUT]Which axes (eg. xy)?{ENTER}
Show Autoscale
show autoscale{ENTER}
--
Logscale xyz
set logscale [INPUT]Which axes (eg. xy)?{ENTER}
No Logscale xyz
unset logscale [INPUT]Which axes (eg. xy)?{ENTER}
Show Logscale
show logscale{ENTER}
--
[Menu]
Tics
Tic format string
set format [INPUT]Axes?[EOS] "[INPUT]Format string?[EOS]"{ENTER}
Tic marks format
show format{ENTER}
--
Inward facing tics (default)
set tics in{ENTER}
Outward facing tics
set tics out{ENTER}
Show tics
show tics{ENTER}
--
Tics level
set ticslevel [INPUT]Level (default=0.5)?{ENTER}
--
Tic interval
set [INPUT]Axis: x, y or z ?[EOS]tics [INPUT]Start, Increment, End (eg. 0,0.5,10) ?{ENTER}
--
Tic labels start
set [INPUT]Axis: x, y or z ?[EOS]tics ("[INPUT]Label text?[EOS]" [INPUT]Position?[EOS]
another Tic label
,"[INPUT]Label text?[EOS]" [INPUT]Position?[EOS]
Tic labels finish
){ENTER}
[EndMenu]
--
X Range
set xrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Y Range
set yrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Z Range
set zrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
--
X Label
set xlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Y Label
set ylabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Z Label
set zlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Show axis Labels
show xlabel{ENTER}show ylabel{ENTER}show zlabel{ENTER}
--
No X zero axis
unset xzeroaxis{ENTER}
No Y zero axis
unset yzeroaxis{ENTER}
X,Y zero axes on
set zeroaxis{ENTER}
Show zero axis status
show zeroaxis{ENTER}
[EndMenu]
[Menu]
&Chart
Grid on
set grid{ENTER}
Grid off
unset grid{ENTER}
Show Grid
show grid{ENTER}
--
Add Arrow
set arrow [INPUT]Tag (1-99)?[EOS] from [INPUT]From coordinate?[EOS] to [INPUT]To coordinate?{ENTER}
Remove arrow
unset arrow [INPUT]Tag (1-99)?{ENTER}
Show Arrows
show arrow{ENTER}
--
Add Label
set label [INPUT]Tag?[EOS] "[INPUT]Label?[EOS]" at [INPUT]Coordinate?[EOS] [INPUT]Justification (l,c,r)?{ENTER}
Remove Label
unset label [INPUT]Tag?{ENTER}
Show Labels
show label{ENTER}
--
Set Title
set title "[INPUT]Title text?[EOS]" [INPUT]X position, Y position (eg. 2,4)?{ENTER}
Show Title
show title{ENTER}
--
Key (legend) position
set key [INPUT]Key position?{ENTER}
Default Key position
set key{ENTER}
No Key
unset key{ENTER}
Show Key position
show key{ENTER}
--
Offsets
set offsets [INPUT]Offsets left,right,top,bottom ?{ENTER}
Show Offsets
show offsets{ENTER}
--
Time location
set time [INPUT]Location (eg. 1,1)?{ENTER}
No Time
unset time{ENTER}
Show Time Location
show time{ENTER}
[EndMenu]
[Menu]
&Styles
[Menu]
Data Style
Lines
set style data lines{ENTER}
Points
set style data points{ENTER}
Lines + Points
set style data linespoints{ENTER}
Dots
set style data dots{ENTER}
Impulses
set style data impulses{ENTER}
--
Error Bars
set style data errorbars{ENTER}
Boxes
set style data boxes{ENTER}
Box Error Bars
set style data boxerrorbars{ENTER}
--
Candlesticks
set style data candlesticks{ENTER}
Finance Bars
set style data financebars{ENTER}
[EndMenu]
Show Data Style
show style data{ENTER}
Clear Data Style
unset style data{ENTER}
--
[Menu]
Function Style
Lines
set style function lines{ENTER}
Points
set style function points{ENTER}
Lines + Points
set style function linespoints{ENTER}
Dots
set style function dots{ENTER}
Impulses
set style function impulses{ENTER}
--
Error Bars
set style function errorbars{ENTER}
Boxes
set style function boxes{ENTER}
Box Error Bars
set style function boxerrorbars{ENTER}
--
Candlesticks
set style function candlesticks{ENTER}
Finance Bars
set style function financebars{ENTER}
[EndMenu]
Show Function Style
show style function{ENTER}
Clear Function Style
unset style function{ENTER}
--
[Menu]
Arrow Style
Head
set style arrow [INPUT]Arrow number?[EOS] head{ENTER}
Heads
set style arrow [INPUT]Arrow number?[EOS] heads{ENTER}
No Heads
set style arrow [INPUT]Arrow number?[EOS] nohead{ENTER}
[EndMenu]
Show Arrow Style
show style arrow [INPUT]Arrow number? {ENTER}
Clear Arrow Style
unset style arrow [INPUT]Arrow number? {ENTER}
--
[Menu]
Fill Style
Empty
set style fill empty{ENTER}
Solid
set style fill solid [INPUT]Density?{ENTER}
Pattern
set style fill pattern [INPUT]Pattern number?{ENTER}
Border
set style fill border [INPUT]Line Type?{ENTER}
No Border
set style fill noborder{ENTER}
[EndMenu]
Show Fill Style
show style fill{ENTER}
Clear Fill Style
unset style fill{ENTER}
--
[Menu]
Line Style
Line Type
set style linetype [INPUT]Line Type?{ENTER}
Line Width
set style linewidth [INPUT]Line Width?{ENTER}
Point Type
set style pointtype [INPUT]Point Type?{ENTER}
Point Size
set style pointsize [INPUT]Point Size?{ENTER}
; Palette
; set style line{ENTER}
[EndMenu]
Show Line Style
show style line{ENTER}
Clear Line Style
unset style line{ENTER}
[EndMenu]
[Menu]
&3D
[Menu]
Contours
Linear Contours
set cntrparam linear{ENTER}
Cubic Spline Contours
set cntrparam cubicspline{ENTER}
B-spline Contours
set cntrparam bspline{ENTER}
Number of Contours
set cntrparam levels [INPUT]How many contours?{ENTER}
Points for Contours
set cntrparam points [INPUT]How many points for the contours?{ENTER}
Order of B-splines
set cntrparam order [INPUT]Order of B-splines (2-10)?{ENTER}
--
Contours on Base
set contour base{ENTER}
Contours on Surfaces
set contour surface{ENTER}
Contours on Both
set contour both{ENTER}
No Contours
unset contour{ENTER}
Show Contour
show contour{ENTER}
--
Number of Isosamples
set isosamples [INPUT]Number of isosamples?{ENTER}
Show Isosamples
show isosamples{ENTER}
[EndMenu]
--
Cartesian Mapping
set mapping cartesian{ENTER}
Spherical Mapping
set mapping spherical{ENTER}
Cylindrical Mapping
set mapping cylindrical{ENTER}
Show Mapping
show mapping{ENTER}
--
Hidden line removal
set hidden3d{ENTER}
No Hidden line removal
unset hidden3d{ENTER}
Show Hidden line removal
show hidden3d{ENTER}
--
Display Surface mesh
set surface{ENTER}
No Surface mesh
unset surface{ENTER}
Show Surface status
show surface{ENTER}
--
Set View
set view [INPUT]X rotation (degrees)?[EOS],[INPUT]Z rotation?[EOS],[INPUT]Scale?[EOS],[INPUT]Z scale?{ENTER}
Show View
show view{ENTER}
[EndMenu]
[Menu]
&Help
&Index
help{ENTER}
Introduction
help introduction{ENTER}
&Topic
help [INPUT]Help Topic?{ENTER}
&Windows
help windows{ENTER}
--
&About
[ABOUT]
[EndMenu]
; now some buttons
; a number after a semicolon in the title string is interpreted as icon index
; see the article "Toolbar Standard Button Image Index Values" on MSDN
; http://msdn.microsoft.com/en-us/library/bb760433%28v=vs.85%29.aspx
[Button]
Replot;4
replot{ENTER}
[Button]
Open;7
load '[OPEN]load[EOS]*.plt[EOS]'{ENTER}
[Button]
Save;8
save '[SAVE]save[EOS]*.plt[EOS]'{ENTER}
[Button]
ChDir;31
cd '[DIRECTORY]New directory?[EOS]'{ENTER}
[Button]
Print;14
set terminal [INPUT]Terminal type?{ENTER}set output "PRN"{ENTER}replot{ENTER}set terminal win{ENTER}set output{ENTER}
[Button]
PrtSc;14
screendump{ENTER}
[Button]
Prev;15
{^P}
[Button]
Next;16
{^N}
[Button]
Options;10
[OPTIONS]

View File

@ -0,0 +1,745 @@
; Menu file for Windows gnuplot
; Roger Hadgraft, 26-5-92
; Russell Lang, 30 Nov 1992
; Modified for 4.0, John Bollinger, 31 Dec 2002
[Menu]
&File
&Open ...
load '[OPEN]load[EOS]*.plt[EOS]'{ENTER}
&Save ...
save '[SAVE]save[EOS]*.plt[EOS]'{ENTER}
&Demos ...
load '[OPEN]load[EOS]*.dem[EOS]'{ENTER}
--
&Change Directory ...
cd '[DIRECTORY]New directory?[EOS]'{ENTER}
show Current &Directory
pwd{ENTER}
--
O&utput ...
set output "[INPUT]Output filename?[EOS]"{ENTER}
&Printer Output
set output "PRN"{ENTER}
&Window Output
set output{ENTER}set terminal win{ENTER}
Show Output
show output{ENTER}
Ou&tput Device ...
set terminal [INPUT]Terminal type?{ENTER}
Show Output Devices
set terminal{ENTER}show terminal{ENTER}
--
[Menu]
History
Previous command ^P
{^P}
Next command ^N
{^N}
--
Back one character ^B
{^B}
Forward one character ^F
{^F}
--
Beginning of the line ^A
{^A}
End of the line ^E
{^E}
--
Delete previous character ^H
{^H}
Delete current character ^D
{^D}
Delete last word ^W
{^W}
Delete to end of line ^K
{^K}
Delete entire line ^U
{^U}
--
Redraw the line ^L
{^L}
[EndMenu]
open DOS window
shell{ENTER}
run DOS command ...
![INPUT]DOS command?{ENTER}
--
E&xit
quit{ENTER}
[EndMenu]
[Menu]
&Plot
Plot
plot
3D Plot
splot
Replot
replot{ENTER}
Clear device
clear{ENTER}
--
Simple Range
[[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS]
Named Range
[[INPUT]Variable name?[EOS]=[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS]
--
Data filename ...
'[OPEN]Open[EOS]*.dat[EOS]' [EOS]
using x,y columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS] [EOS]
using x,y,ydelta columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ydelta column?[EOS] [EOS]
using x,y,ylow,yhigh columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ylow column?[EOS]:[INPUT]Yhigh column?[EOS] [EOS]
--
[Menu]
with Style (simple)
Lines
with lines
Points
with points
Lines and Points
with linespoints
Impulses
with impulses
Dots
with dots
Steps
with steps
Fsteps
with fsteps
Histeps
with histeps
[EndMenu]
[Menu]
with Style (compound)
Error Bars
with errorbars
X Error Bars
with xerrorbars
Y Error Bars
with yerrorbars
XY Error Bars
with xyerrorbars
Error Lines
with errorlines
X Error Lines
with xerrorlines
Y Error Lines
with yerrorlines
XY Error Lines
with xyerrorlines
Boxes
with boxes
Filled Curves
with filledcurves
Box Error Bars
with boxerrorbars
Box XY Error Bars
with boxxyerrorbars
Finance Bars
with financebars
Candlesticks
with candlesticks
[EndMenu]
[EndMenu]
[Menu]
&Expressions
Evaluate
print
Complex number ...
{[INPUT]Real part?[EOS],[INPUT]Imaginary part?[EOS]}
[Menu]
Unary
Minus -a
-[INPUT]Arg
Plus +a
+[INPUT]Arg
One's compliment ~a
~[INPUT]Arg
Logcial negation !a
![INPUT]Arg
Factorial a!
[INPUT]Arg[EOS]!
[EndMenu]
[Menu]
Binary
Exponentiation **
**
Multiply *
*
Divide /
/
Add +
+
Subtract -
-
--
Modulo %
%
[EndMenu]
[Menu]
Logical
Equality ==
==
Inequality !=
!=
--
less than <
<
less than or equal <=
<=
greater than >
>
greater than or equal >=
>=
--
Bitwise AND &
&
Bitwise exclusive OR ^
^
Bitwise inclusive OR |
|
--
Logical AND &&
&&
Logical OR ||
||
--
Ternary operator a?b:c
[INPUT]First arg[EOS]?[INPUT]Second arg[EOS]:[INPUT]Third arg[EOS]
[EndMenu]
[EndMenu]
[Menu]
Fu&nctions
[Menu]
Elementary
random number
rand([INPUT]Argument[EOS])
absolute value
abs([INPUT]Argument[EOS])
sign
sgn([INPUT]Argument[EOS])
--
ceiling
ceil([INPUT]Argument[EOS])
floor
floor([INPUT]Argument[EOS])
integer
int([INPUT]Argument[EOS])
--
square root
sqrt([INPUT]Argument[EOS])
exponent
exp([INPUT]Argument[EOS])
logarithm (e)
log([INPUT]Argument[EOS])
logarithm (10)
log10([INPUT]Argument[EOS])
--
cosine
cos([INPUT]Argument[EOS])
sine
sin([INPUT]Argument[EOS])
tangent
tan([INPUT]Argument[EOS])
--
arc cosine
acos([INPUT]Argument[EOS])
arc sine
asin([INPUT]Argument[EOS])
arc tangent
atan([INPUT]Argument[EOS])
arc tangent 2
atan2([INPUT]Argument[EOS])
--
hyperbolic cosine
cosh([INPUT]Argument[EOS])
hyperbolic sine
sinh([INPUT]Argument[EOS])
hyperbolic tangent
tanh([INPUT]Argument[EOS])
--
imaginary
imag([INPUT]Argument[EOS])
real
real([INPUT]Argument[EOS])
arg
arg([INPUT]Argument[EOS])
[EndMenu]
[Menu]
Special
error
erf([INPUT]Argument[EOS])
error c
erfc([INPUT]Argument[EOS])
inv error
inverf([INPUT]Argument[EOS])
--
gamma
gamma([INPUT]Argument[EOS])
igamma
igamma([INPUT]First argument[EOS],[INPUT]Second argument[EOS])
lgamma
lgamma([INPUT]Argument[EOS])
--
ibeta
ibeta([INPUT]First argument[EOS],[INPUT]Second argument[EOS],[INPUT]Third argument[EOS])
--
bessel j0
besj0([INPUT]Argument[EOS])
bessel j1
besj1([INPUT]Argument[EOS])
bessel y0
besy0([INPUT]Argument[EOS])
bessel y1
besy1([INPUT]Argument[EOS])
--
lambertw
lambertw([INPUT]Argument[EOS])
[EndMenu]
[Menu]
Statistical
normal
norm([INPUT]Argument[EOS])
inverse normal
invnorm([INPUT]Argument[EOS])
[EndMenu]
--
Define User Function ...
[INPUT]Name for function?[EOS][INPUT]Variable/s, eg. (a,b) ?[EOS]=
Show User Functions
show functions{ENTER}
--
Define User Variable ...
[INPUT]Name for variable?[EOS]=[INPUT]Value, eg. 9.81 ?{ENTER}
Show User Variables
show variables{ENTER}
--
x Dummy variable
set dummy [INPUT]Variable name?{ENTER}
x,y Dummy variables
set dummy [INPUT]Variable names (eg. u,v)?{ENTER}
Show Dummy variables
show dummy{ENTER}
[EndMenu]
[Menu]
&General
Border on
set border{ENTER}
Border off
unset border{ENTER}
Show Border
show border{ENTER}
--
Box width
set boxwidth [INPUT]Box Width?{ENTER}
Auto Box Width
set boxwidth{ENTER}
Show Box width
show boxwidth{ENTER}
--
Show Line Types
test{ENTER}
--
[Menu]
Parametric
Set Parametric
set parametric{ENTER}
Not Parametric
unset parametric{ENTER}
Show Parametric
show parametric{ENTER}
--
t Range
set trange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
u Range
set urange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
v Range
set vrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
[EndMenu]
--
[Menu]
Clipping
Clip near points
set clip points{ENTER}
Clip one point
set clip one{ENTER}
Clip two points
set clip two{ENTER}
No Clipping
unset clip{ENTER}
Show Clip type
show clip{ENTER}
[EndMenu]
--
[Menu]
Polar
Polar
set polar{ENTER}
Not Polar
unset polar{ENTER}
Show Polar
show polar{ENTER}
Radial Range
set rrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Angles in Degrees
set angles degrees{ENTER}
Angles in Radians
set angles radians{ENTER}
Show Angle units
show angles{ENTER}
[EndMenu]
--
Set Plot Size
set size [INPUT]Xscale?[EOS],[INPUT]Yscale?{ENTER}
Show Plot Size
show size{ENTER}
--
Sampling Rate
set sample [INPUT]Sampling rate (default=100)?{ENTER}
Show Sampling Rate
show sample{ENTER}
[EndMenu]
[Menu]
&Axes
Autoscale xy
set autoscale [INPUT]Which axes (eg. xy)?{ENTER}
No Autoscale xy
unset autoscale [INPUT]Which axes (eg. xy)?{ENTER}
Show Autoscale
show autoscale{ENTER}
--
Logscale xyz
set logscale [INPUT]Which axes (eg. xy)?{ENTER}
No Logscale xyz
unset logscale [INPUT]Which axes (eg. xy)?{ENTER}
Show Logscale
show logscale{ENTER}
--
[Menu]
Tics
Tic format string
set format [INPUT]Axes?[EOS] "[INPUT]Format string?[EOS]"{ENTER}
Tic marks format
show format{ENTER}
--
Inward facing tics (default)
set tics in{ENTER}
Outward facing tics
set tics out{ENTER}
Show tics
show tics{ENTER}
--
Tics level
set ticslevel [INPUT]Level (default=0.5)?{ENTER}
--
Tic interval
set [INPUT]Axis: x, y or z ?[EOS]tics [INPUT]Start, Increment, End (eg. 0,0.5,10) ?{ENTER}
--
Tic labels start
set [INPUT]Axis: x, y or z ?[EOS]tics ("[INPUT]Label text?[EOS]" [INPUT]Position?[EOS]
another Tic label
,"[INPUT]Label text?[EOS]" [INPUT]Position?[EOS]
Tic labels finish
){ENTER}
[EndMenu]
--
X Range
set xrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Y Range
set yrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Z Range
set zrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
--
X Label
set xlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Y Label
set ylabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Z Label
set zlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Show axis Labels
show xlabel{ENTER}show ylabel{ENTER}show zlabel{ENTER}
--
No X zero axis
unset xzeroaxis{ENTER}
No Y zero axis
unset yzeroaxis{ENTER}
X,Y zero axes on
set zeroaxis{ENTER}
Show zero axis status
show zeroaxis{ENTER}
[EndMenu]
[Menu]
&Chart
Grid on
set grid{ENTER}
Grid off
unset grid{ENTER}
Show Grid
show grid{ENTER}
--
Add Arrow
set arrow [INPUT]Tag (1-99)?[EOS] from [INPUT]From coordinate?[EOS] to [INPUT]To coordinate?{ENTER}
Remove arrow
unset arrow [INPUT]Tag (1-99)?{ENTER}
Show Arrows
show arrow{ENTER}
--
Add Label
set label [INPUT]Tag?[EOS] "[INPUT]Label?[EOS]" at [INPUT]Coordinate?[EOS] [INPUT]Justification (l,c,r)?{ENTER}
Remove Label
unset label [INPUT]Tag?{ENTER}
Show Labels
show label{ENTER}
--
Set Title
set title "[INPUT]Title text?[EOS]" [INPUT]X position, Y position (eg. 2,4)?{ENTER}
Show Title
show title{ENTER}
--
Key (legend) position
set key [INPUT]Key position?{ENTER}
Default Key position
set key{ENTER}
No Key
unset key{ENTER}
Show Key position
show key{ENTER}
--
Offsets
set offsets [INPUT]Offsets left,right,top,bottom ?{ENTER}
Show Offsets
show offsets{ENTER}
--
Time location
set time [INPUT]Location (eg. 1,1)?{ENTER}
No Time
unset time{ENTER}
Show Time Location
show time{ENTER}
[EndMenu]
[Menu]
&Styles
[Menu]
Data Style
Lines
set style data lines{ENTER}
Points
set style data points{ENTER}
Lines + Points
set style data linespoints{ENTER}
Dots
set style data dots{ENTER}
Impulses
set style data impulses{ENTER}
--
Error Bars
set style data errorbars{ENTER}
Boxes
set style data boxes{ENTER}
Box Error Bars
set style data boxerrorbars{ENTER}
--
Candlesticks
set style data candlesticks{ENTER}
Finance Bars
set style data financebars{ENTER}
[EndMenu]
Show Data Style
show style data{ENTER}
Clear Data Style
unset style data{ENTER}
--
[Menu]
Function Style
Lines
set style function lines{ENTER}
Points
set style function points{ENTER}
Lines + Points
set style function linespoints{ENTER}
Dots
set style function dots{ENTER}
Impulses
set style function impulses{ENTER}
--
Error Bars
set style function errorbars{ENTER}
Boxes
set style function boxes{ENTER}
Box Error Bars
set style function boxerrorbars{ENTER}
--
Candlesticks
set style function candlesticks{ENTER}
Finance Bars
set style function financebars{ENTER}
[EndMenu]
Show Function Style
show style function{ENTER}
Clear Function Style
unset style function{ENTER}
--
[Menu]
Arrow Style
Head
set style arrow [INPUT]Arrow number?[EOS] head{ENTER}
Heads
set style arrow [INPUT]Arrow number?[EOS] heads{ENTER}
No Heads
set style arrow [INPUT]Arrow number?[EOS] nohead{ENTER}
[EndMenu]
Show Arrow Style
show style arrow [INPUT]Arrow number? {ENTER}
Clear Arrow Style
unset style arrow [INPUT]Arrow number? {ENTER}
--
[Menu]
Fill Style
Empty
set style fill empty{ENTER}
Solid
set style fill solid [INPUT]Density?{ENTER}
Pattern
set style fill pattern [INPUT]Pattern number?{ENTER}
Border
set style fill border [INPUT]Line Type?{ENTER}
No Border
set style fill noborder{ENTER}
[EndMenu]
Show Fill Style
show style fill{ENTER}
Clear Fill Style
unset style fill{ENTER}
--
[Menu]
Line Style
Line Type
set style linetype [INPUT]Line Type?{ENTER}
Line Width
set style linewidth [INPUT]Line Width?{ENTER}
Point Type
set style pointtype [INPUT]Point Type?{ENTER}
Point Size
set style pointsize [INPUT]Point Size?{ENTER}
; Palette
; set style line{ENTER}
[EndMenu]
Show Line Style
show style line{ENTER}
Clear Line Style
unset style line{ENTER}
[EndMenu]
[Menu]
&3D
[Menu]
Contours
Linear Contours
set cntrparam linear{ENTER}
Cubic Spline Contours
set cntrparam cubicspline{ENTER}
B-spline Contours
set cntrparam bspline{ENTER}
Number of Contours
set cntrparam levels [INPUT]How many contours?{ENTER}
Points for Contours
set cntrparam points [INPUT]How many points for the contours?{ENTER}
Order of B-splines
set cntrparam order [INPUT]Order of B-splines (2-10)?{ENTER}
--
Contours on Base
set contour base{ENTER}
Contours on Surfaces
set contour surface{ENTER}
Contours on Both
set contour both{ENTER}
No Contours
unset contour{ENTER}
Show Contour
show contour{ENTER}
--
Number of Isosamples
set isosamples [INPUT]Number of isosamples?{ENTER}
Show Isosamples
show isosamples{ENTER}
[EndMenu]
--
Cartesian Mapping
set mapping cartesian{ENTER}
Spherical Mapping
set mapping spherical{ENTER}
Cylindrical Mapping
set mapping cylindrical{ENTER}
Show Mapping
show mapping{ENTER}
--
Hidden line removal
set hidden3d{ENTER}
No Hidden line removal
unset hidden3d{ENTER}
Show Hidden line removal
show hidden3d{ENTER}
--
Display Surface mesh
set surface{ENTER}
No Surface mesh
unset surface{ENTER}
Show Surface status
show surface{ENTER}
--
Set View
set view [INPUT]X rotation (degrees)?[EOS],[INPUT]Z rotation?[EOS],[INPUT]Scale?[EOS],[INPUT]Z scale?{ENTER}
Show View
show view{ENTER}
[EndMenu]
[Menu]
&Help
&Index
help{ENTER}
Introduction
help introduction{ENTER}
&Topic
help [INPUT]Help Topic?{ENTER}
&Windows
help windows{ENTER}
[EndMenu]
; now some buttons
; DON'T put a shortcut key (&) on any of these because
; it doesn't work with Windows 3.1 and it HANGS Windows 3.0.
[Button]
Replot
replot{ENTER}
[Button]
Open
load '[OPEN]load[EOS]*.plt[EOS]'{ENTER}
[Button]
Save
save '[SAVE]save[EOS]*.plt[EOS]'{ENTER}
[Button]
ChDir
cd '[DIRECTORY]New directory?[EOS]'{ENTER}
[Button]
Print
set terminal [INPUT]Terminal type?{ENTER}set output "PRN"{ENTER}replot{ENTER}set terminal win{ENTER}set output{ENTER}
[Button]
PrtSc
screendump{ENTER}
[Button]
Prev
{^P}
[Button]
Next
{^N}

View File

@ -0,0 +1,752 @@
; Menu file for Windows gnuplot
; Roger Hadgraft, 26-5-92
; Russell Lang, 30 Nov 1992
; Modified for 4.0, John Bollinger, 31 Dec 2002
[Menu]
&File
&Open ...
load '[OPEN]load[EOS]*.plt[EOS]'{ENTER}
&Save ...
save '[SAVE]save[EOS]*.plt[EOS]'{ENTER}
&Demos ...
load '[OPEN]load[EOS]*.dem[EOS]'{ENTER}
--
&Change Directory ...
cd '[DIRECTORY]New directory?[EOS]'{ENTER}
show Current &Directory
pwd{ENTER}
--
O&utput ...
set output "[INPUT]Output filename?[EOS]"{ENTER}
&Printer Output
set output "PRN"{ENTER}
&Window Output
set output{ENTER}set terminal win{ENTER}
Show Output
show output{ENTER}
Ou&tput Device ...
set terminal [INPUT]Terminal type?{ENTER}
Show Output Devices
set terminal{ENTER}show terminal{ENTER}
--
[Menu]
History
Previous command ^P
{^P}
Next command ^N
{^N}
--
Back one character ^B
{^B}
Forward one character ^F
{^F}
--
Beginning of the line ^A
{^A}
End of the line ^E
{^E}
--
Delete previous character ^H
{^H}
Delete current character ^D
{^D}
Delete last word ^W
{^W}
Delete to end of line ^K
{^K}
Delete entire line ^U
{^U}
--
Redraw the line ^L
{^L}
[EndMenu]
open DOS window
shell{ENTER}
run DOS command ...
![INPUT]DOS command?{ENTER}
--
E&xit
quit{ENTER}
[EndMenu]
[Menu]
&Plot
Plot
plot
3D Plot
splot
Replot
replot{ENTER}
Clear device
clear{ENTER}
--
Simple Range
[[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS]
Named Range
[[INPUT]Variable name?[EOS]=[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]] [EOS]
--
Data filename ...
'[OPEN]Open[EOS]*.dat[EOS]' [EOS]
using x,y columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS] [EOS]
using x,y,ydelta columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ydelta column?[EOS] [EOS]
using x,y,ylow,yhigh columns
using [INPUT]X column?[EOS]:[INPUT]Y column?[EOS]:[INPUT]Ylow column?[EOS]:[INPUT]Yhigh column?[EOS] [EOS]
--
[Menu]
with Style (simple)
Lines
with lines
Points
with points
Lines and Points
with linespoints
Impulses
with impulses
Dots
with dots
Steps
with steps
Fsteps
with fsteps
Histeps
with histeps
[EndMenu]
[Menu]
with Style (compound)
Error Bars
with errorbars
X Error Bars
with xerrorbars
Y Error Bars
with yerrorbars
XY Error Bars
with xyerrorbars
Error Lines
with errorlines
X Error Lines
with xerrorlines
Y Error Lines
with yerrorlines
XY Error Lines
with xyerrorlines
Boxes
with boxes
Filled Curves
with filledcurves
Box Error Bars
with boxerrorbars
Box XY Error Bars
with boxxyerrorbars
Finance Bars
with financebars
Candlesticks
with candlesticks
[EndMenu]
[EndMenu]
[Menu]
&Expressions
Evaluate
print
Complex number ...
{[INPUT]Real part?[EOS],[INPUT]Imaginary part?[EOS]}
[Menu]
Unary
Minus -a
-[INPUT]Arg
Plus +a
+[INPUT]Arg
One's compliment ~a
~[INPUT]Arg
Logcial negation !a
![INPUT]Arg
Factorial a!
[INPUT]Arg[EOS]!
[EndMenu]
[Menu]
Binary
Exponentiation **
**
Multiply *
*
Divide /
/
Add +
+
Subtract -
-
--
Modulo %
%
[EndMenu]
[Menu]
Logical
Equality ==
==
Inequality !=
!=
--
less than <
<
less than or equal <=
<=
greater than >
>
greater than or equal >=
>=
--
Bitwise AND &
&
Bitwise exclusive OR ^
^
Bitwise inclusive OR |
|
--
Logical AND &&
&&
Logical OR ||
||
--
Ternary operator a?b:c
[INPUT]First arg[EOS]?[INPUT]Second arg[EOS]:[INPUT]Third arg[EOS]
[EndMenu]
[EndMenu]
[Menu]
Fu&nctions
[Menu]
Elementary
random number
rand([INPUT]Argument[EOS])
absolute value
abs([INPUT]Argument[EOS])
sign
sgn([INPUT]Argument[EOS])
--
ceiling
ceil([INPUT]Argument[EOS])
floor
floor([INPUT]Argument[EOS])
integer
int([INPUT]Argument[EOS])
--
square root
sqrt([INPUT]Argument[EOS])
exponent
exp([INPUT]Argument[EOS])
logarithm (e)
log([INPUT]Argument[EOS])
logarithm (10)
log10([INPUT]Argument[EOS])
--
cosine
cos([INPUT]Argument[EOS])
sine
sin([INPUT]Argument[EOS])
tangent
tan([INPUT]Argument[EOS])
--
arc cosine
acos([INPUT]Argument[EOS])
arc sine
asin([INPUT]Argument[EOS])
arc tangent
atan([INPUT]Argument[EOS])
arc tangent 2
atan2([INPUT]Argument[EOS])
--
hyperbolic cosine
cosh([INPUT]Argument[EOS])
hyperbolic sine
sinh([INPUT]Argument[EOS])
hyperbolic tangent
tanh([INPUT]Argument[EOS])
--
imaginary
imag([INPUT]Argument[EOS])
real
real([INPUT]Argument[EOS])
arg
arg([INPUT]Argument[EOS])
[EndMenu]
[Menu]
Special
error
erf([INPUT]Argument[EOS])
error c
erfc([INPUT]Argument[EOS])
inv error
inverf([INPUT]Argument[EOS])
--
gamma
gamma([INPUT]Argument[EOS])
igamma
igamma([INPUT]First argument[EOS],[INPUT]Second argument[EOS])
lgamma
lgamma([INPUT]Argument[EOS])
--
ibeta
ibeta([INPUT]First argument[EOS],[INPUT]Second argument[EOS],[INPUT]Third argument[EOS])
--
bessel j0
besj0([INPUT]Argument[EOS])
bessel j1
besj1([INPUT]Argument[EOS])
bessel y0
besy0([INPUT]Argument[EOS])
bessel y1
besy1([INPUT]Argument[EOS])
--
lambertw
lambertw([INPUT]Argument[EOS])
[EndMenu]
[Menu]
Statistical
normal
norm([INPUT]Argument[EOS])
inverse normal
invnorm([INPUT]Argument[EOS])
[EndMenu]
--
Define User Function ...
[INPUT]Name for function?[EOS][INPUT]Variable/s, eg. (a,b) ?[EOS]=
Show User Functions
show functions{ENTER}
--
Define User Variable ...
[INPUT]Name for variable?[EOS]=[INPUT]Value, eg. 9.81 ?{ENTER}
Show User Variables
show variables{ENTER}
--
x Dummy variable
set dummy [INPUT]Variable name?{ENTER}
x,y Dummy variables
set dummy [INPUT]Variable names (eg. u,v)?{ENTER}
Show Dummy variables
show dummy{ENTER}
[EndMenu]
[Menu]
&General
Border on
set border{ENTER}
Border off
unset border{ENTER}
Show Border
show border{ENTER}
--
Box width
set boxwidth [INPUT]Box Width?{ENTER}
Auto Box Width
set boxwidth{ENTER}
Show Box width
show boxwidth{ENTER}
--
Show Line Types
test{ENTER}
--
[Menu]
Parametric
Set Parametric
set parametric{ENTER}
Not Parametric
unset parametric{ENTER}
Show Parametric
show parametric{ENTER}
--
t Range
set trange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
u Range
set urange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
v Range
set vrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
[EndMenu]
--
[Menu]
Clipping
Clip near points
set clip points{ENTER}
Clip one point
set clip one{ENTER}
Clip two points
set clip two{ENTER}
No Clipping
unset clip{ENTER}
Show Clip type
show clip{ENTER}
[EndMenu]
--
[Menu]
Polar
Polar
set polar{ENTER}
Not Polar
unset polar{ENTER}
Show Polar
show polar{ENTER}
Radial Range
set rrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Angles in Degrees
set angles degrees{ENTER}
Angles in Radians
set angles radians{ENTER}
Show Angle units
show angles{ENTER}
[EndMenu]
--
Set Plot Size
set size [INPUT]Xscale?[EOS],[INPUT]Yscale?{ENTER}
Show Plot Size
show size{ENTER}
--
Sampling Rate
set sample [INPUT]Sampling rate (default=100)?{ENTER}
Show Sampling Rate
show sample{ENTER}
[EndMenu]
[Menu]
&Axes
Autoscale xy
set autoscale [INPUT]Which axes (eg. xy)?{ENTER}
No Autoscale xy
unset autoscale [INPUT]Which axes (eg. xy)?{ENTER}
Show Autoscale
show autoscale{ENTER}
--
Logscale xyz
set logscale [INPUT]Which axes (eg. xy)?{ENTER}
No Logscale xyz
unset logscale [INPUT]Which axes (eg. xy)?{ENTER}
Show Logscale
show logscale{ENTER}
--
[Menu]
Tics
Tic format string
set format [INPUT]Axes?[EOS] "[INPUT]Format string?[EOS]"{ENTER}
Tic marks format
show format{ENTER}
--
Inward facing tics (default)
set tics in{ENTER}
Outward facing tics
set tics out{ENTER}
Show tics
show tics{ENTER}
--
Tics level
set ticslevel [INPUT]Level (default=0.5)?{ENTER}
--
Tic interval
set [INPUT]Axis: x, y or z ?[EOS]tics [INPUT]Start, Increment, End (eg. 0,0.5,10) ?{ENTER}
--
Tic labels start
set [INPUT]Axis: x, y or z ?[EOS]tics ("[INPUT]Label text?[EOS]" [INPUT]Position?[EOS]
another Tic label
,"[INPUT]Label text?[EOS]" [INPUT]Position?[EOS]
Tic labels finish
){ENTER}
[EndMenu]
--
X Range
set xrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Y Range
set yrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
Z Range
set zrange [[INPUT]Lower bound?[EOS]:[INPUT]Upper bound?[EOS]]{ENTER}
--
X Label
set xlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Y Label
set ylabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Z Label
set zlabel "[INPUT]Label text?[EOS]" [INPUT]X offset, Y offset (eg. 2,3) ?{ENTER}
Show axis Labels
show xlabel{ENTER}show ylabel{ENTER}show zlabel{ENTER}
--
No X zero axis
unset xzeroaxis{ENTER}
No Y zero axis
unset yzeroaxis{ENTER}
X,Y zero axes on
set zeroaxis{ENTER}
Show zero axis status
show zeroaxis{ENTER}
[EndMenu]
[Menu]
&Chart
Grid on
set grid{ENTER}
Grid off
unset grid{ENTER}
Show Grid
show grid{ENTER}
--
Add Arrow
set arrow [INPUT]Tag (1-99)?[EOS] from [INPUT]From coordinate?[EOS] to [INPUT]To coordinate?{ENTER}
Remove arrow
unset arrow [INPUT]Tag (1-99)?{ENTER}
Show Arrows
show arrow{ENTER}
--
Add Label
set label [INPUT]Tag?[EOS] "[INPUT]Label?[EOS]" at [INPUT]Coordinate?[EOS] [INPUT]Justification (l,c,r)?{ENTER}
Remove Label
unset label [INPUT]Tag?{ENTER}
Show Labels
show label{ENTER}
--
Set Title
set title "[INPUT]Title text?[EOS]" [INPUT]X position, Y position (eg. 2,4)?{ENTER}
Show Title
show title{ENTER}
--
Key (legend) position
set key [INPUT]Key position?{ENTER}
Default Key position
set key{ENTER}
No Key
unset key{ENTER}
Show Key position
show key{ENTER}
--
Offsets
set offsets [INPUT]Offsets left,right,top,bottom ?{ENTER}
Show Offsets
show offsets{ENTER}
--
Time location
set time [INPUT]Location (eg. 1,1)?{ENTER}
No Time
unset time{ENTER}
Show Time Location
show time{ENTER}
[EndMenu]
[Menu]
&Styles
[Menu]
Data Style
Lines
set style data lines{ENTER}
Points
set style data points{ENTER}
Lines + Points
set style data linespoints{ENTER}
Dots
set style data dots{ENTER}
Impulses
set style data impulses{ENTER}
--
Error Bars
set style data errorbars{ENTER}
Boxes
set style data boxes{ENTER}
Box Error Bars
set style data boxerrorbars{ENTER}
--
Candlesticks
set style data candlesticks{ENTER}
Finance Bars
set style data financebars{ENTER}
[EndMenu]
Show Data Style
show style data{ENTER}
Clear Data Style
unset style data{ENTER}
--
[Menu]
Function Style
Lines
set style function lines{ENTER}
Points
set style function points{ENTER}
Lines + Points
set style function linespoints{ENTER}
Dots
set style function dots{ENTER}
Impulses
set style function impulses{ENTER}
--
Error Bars
set style function errorbars{ENTER}
Boxes
set style function boxes{ENTER}
Box Error Bars
set style function boxerrorbars{ENTER}
--
Candlesticks
set style function candlesticks{ENTER}
Finance Bars
set style function financebars{ENTER}
[EndMenu]
Show Function Style
show style function{ENTER}
Clear Function Style
unset style function{ENTER}
--
[Menu]
Arrow Style
Head
set style arrow [INPUT]Arrow number?[EOS] head{ENTER}
Heads
set style arrow [INPUT]Arrow number?[EOS] heads{ENTER}
No Heads
set style arrow [INPUT]Arrow number?[EOS] nohead{ENTER}
[EndMenu]
Show Arrow Style
show style arrow [INPUT]Arrow number? {ENTER}
Clear Arrow Style
unset style arrow [INPUT]Arrow number? {ENTER}
--
[Menu]
Fill Style
Empty
set style fill empty{ENTER}
Solid
set style fill solid [INPUT]Density?{ENTER}
Pattern
set style fill pattern [INPUT]Pattern number?{ENTER}
Border
set style fill border [INPUT]Line Type?{ENTER}
No Border
set style fill noborder{ENTER}
[EndMenu]
Show Fill Style
show style fill{ENTER}
Clear Fill Style
unset style fill{ENTER}
--
[Menu]
Line Style
Line Type
set style linetype [INPUT]Line Type?{ENTER}
Line Width
set style linewidth [INPUT]Line Width?{ENTER}
Point Type
set style pointtype [INPUT]Point Type?{ENTER}
Point Size
set style pointsize [INPUT]Point Size?{ENTER}
; Palette
; set style line{ENTER}
[EndMenu]
Show Line Style
show style line{ENTER}
Clear Line Style
unset style line{ENTER}
[EndMenu]
[Menu]
&3D
[Menu]
Contours
Linear Contours
set cntrparam linear{ENTER}
Cubic Spline Contours
set cntrparam cubicspline{ENTER}
B-spline Contours
set cntrparam bspline{ENTER}
Number of Contours
set cntrparam levels [INPUT]How many contours?{ENTER}
Points for Contours
set cntrparam points [INPUT]How many points for the contours?{ENTER}
Order of B-splines
set cntrparam order [INPUT]Order of B-splines (2-10)?{ENTER}
--
Contours on Base
set contour base{ENTER}
Contours on Surfaces
set contour surface{ENTER}
Contours on Both
set contour both{ENTER}
No Contours
unset contour{ENTER}
Show Contour
show contour{ENTER}
--
Number of Isosamples
set isosamples [INPUT]Number of isosamples?{ENTER}
Show Isosamples
show isosamples{ENTER}
[EndMenu]
--
Cartesian Mapping
set mapping cartesian{ENTER}
Spherical Mapping
set mapping spherical{ENTER}
Cylindrical Mapping
set mapping cylindrical{ENTER}
Show Mapping
show mapping{ENTER}
--
Hidden line removal
set hidden3d{ENTER}
No Hidden line removal
unset hidden3d{ENTER}
Show Hidden line removal
show hidden3d{ENTER}
--
Display Surface mesh
set surface{ENTER}
No Surface mesh
unset surface{ENTER}
Show Surface status
show surface{ENTER}
--
Set View
set view [INPUT]X rotation (degrees)?[EOS],[INPUT]Z rotation?[EOS],[INPUT]Scale?[EOS],[INPUT]Z scale?{ENTER}
Show View
show view{ENTER}
[EndMenu]
[Menu]
&Help
&Index
help{ENTER}
Introduction
help introduction{ENTER}
&Topic
help [INPUT]Help Topic?{ENTER}
&Windows
help windows{ENTER}
--
&About
[ABOUT]
[EndMenu]
; now some buttons
; a number after a semicolon in the title string is interpreted as icon index
; see the article "Toolbar Standard Button Image Index Values" on MSDN
; http://msdn.microsoft.com/en-us/library/bb760433%28v=vs.85%29.aspx
[Button]
Replot;4
replot{ENTER}
[Button]
Open;7
load '[OPEN]load[EOS]*.plt[EOS]'{ENTER}
[Button]
Save;8
save '[SAVE]save[EOS]*.plt[EOS]'{ENTER}
[Button]
ChDir;31
cd '[DIRECTORY]New directory?[EOS]'{ENTER}
[Button]
Print;14
set terminal [INPUT]Terminal type?{ENTER}set output "PRN"{ENTER}replot{ENTER}set terminal win{ENTER}set output{ENTER}
[Button]
PrtSc;14
screendump{ENTER}
[Button]
Prev;15
{^P}
[Button]
Next;16
{^N}
[Button]
Options;10
[OPTIONS]

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -0,0 +1,10 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@ -0,0 +1,2 @@
#v4.0:v100:false
Debug|x64|D:\Projects\C++\testpolsarpro50\testpolsarpro50\|

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\codestorage\testpolsarpro50\testpolsarpro50\testpolsarpro50\x64\Release\surface_inversion_oh2004.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\codestorage\testpolsarpro50\testpolsarpro50\testpolsarpro50\x64\Release\testpolsarpro50.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

View File

@ -0,0 +1,2 @@
#v4.0:v100:false
Release|x64|D:\Projects\C++\testpolsarpro50\testpolsarpro50\|