![]() |
MERIS IDL General Purpose Tools |
Issue 1.1 November 2000 |
Last modified: Fri Oct 27 15:16:14 2000.
NAME:
COMPARE
PURPOSE:
Compares fields between two *.BAF files.
CATEGORY:
Input/Output
CALLING SEQUENCE:
COMPARE,FILE1=file1,FILE2=file2,fields=fields,ZONE=zone,DIFF_FIELDS=diff_fields
INPUTS:
All inputs are passed using keyword parameters.
OPTIONAL INPUTS:
None
KEYWORD PARAMETERS:
FILE1 - filename of first file
FILE2 - filename of second file
FIELDS - string array specifying the fields to check, if not
set than all fields are compared.
ZONE - 4 integer array specifying the zone to check
(ZONE=[X0,Y0,X1,Y1]) where the pixel coordinates are
given wrt the global line/column pixel
coordinates. If this keyword is not set than the
entire image is compared.
OUTPUTS:
None
OPTIONAL OUTPUTS:
DIFF_FIELDS - string array giving, among the fields that are
checked, the fields that differ between the two
files.
DIFF_STATS - 5-column array giving statistics for all the fields
that differ between the 2 files. The 5 values are
respectively for the region Of Interest:
number of pixels that differ
maximum difference
minimum difference
mean difference
stddev difference
COMMON BLOCKS:
None
SIDE EFFECTS:
Unknown
RESTRICTIONS:
RD_BAF.PRO must be compiled before using this function. If the
FIELDS keyword is not set then it is highly recommended to compare
*.BAF files of same type (i.e both int_s1 file types).
PROCEDURE:
retrieves field names from file1, then in sequence retrieves
each field from both files on the Region Of Interest and compares them.
EXAMPLE:
file1='/megs/megs.4.3/folders/test/case1_30_copy/files/int_s1l2.baf'
file2='/u7/lb/Meris/gmv/case1_30_int_s1l2.baf'
fields=['view_zenith']
zone=[609,1,703,63]
zone=[608,0,704,64]
COMPARE,FILE1=file1,FILE2=file2,fields=fields,ZONE=zone
diff_fields=1
COMPARE,FILE1=file1,FILE2=file2,ZONE=zone,DIFF_FIELDS=diff_fields
COMPARE,FILE1=file1,FILE2=file2,ZONE=zone,DIFF_FIELDS=diff_fields,fields=['rho']
MODIFICATION HISTORY:
Created by Vincent Fournier-Sicre - vfs@acri-st.fr - 23 October 2000
(See $IDL_LOCAL/Products/compare.pro)
NAME:
RD_BAF
PURPOSE:
reads data from a breakpoint/intermediate level 2 file and
stores it into a structure
CATEGORY:
Input/Output
CALLING SEQUENCE:
s=rd_baf(FILENAME=filename,PARAM=['param1','param2','param3'],ZONE=[x0,y0,x1,y1],/SPECTRAL_FIELDS)
INPUTS:
All inputs are passed with keyword parameters
OPTIONAL INPUTS:
None
KEYWORD PARAMETERS:
FILENAME - string scalar holding breakpoint/intermediate filename
PARAM - string array holding field keywords that need to be retrieved;
SPECTRAL_FIELDS - if set, then the returned structure holds for
each spectral field one tag per wavelength
ZONE - 4 elements integer array specifying the zone
from which you wish to retrieve data (ZONE=[X0,Y0,X1,Y1])
where X0,Y0,X1,Y1 are respectively column and line coordinates of
first and last pixels to retrieve wrt MERIS
global product coordinates. If the zone that
is passed to the function is larger than the
zone actually stored in the file or if it is
obviously falty than it is corrected and modified by the function.
OUTPUTS:
structure holding tags with names corresponding to field keywords
that are passed to the function
OPTIONAL OUTPUTS:
ZONE - zone becomes an optional output if it is passed to the
function but not initialized as a 4 integer array, in
this case it is updated by the function to output the
line/column coordinates of the zone that is actualy retrieved.
COMMON BLOCKS:
None
SIDE EFFECTS:
Unknown
RESTRICTIONS:
The breakpoint/intermediate file is entirely scanned for each
parameter that is retrieved ---> this should be improved
PROCEDURE:
The file is scanned for each parameter and whenever the field
keyword is identified, values are retrieved and stored in a structure.
EXAMPLE:
baffile='/megs/megs.4.3/folders/sat_l2/pacific_30/files/brk_s2l2.baf'
s=rd_baf(FILENAME=baffile,param=['aer'])
s=rd_baf(FILENAME=baffile,param=['tutu','fa','chl_1','aer'])
baffile='/megs/megs.4.3/folders/sat_l2/pacific_30/files/int_s1l2.baf'
s=rd_baf(FILENAME=baffile,param=['altitude'])
s=rd_baf(FILENAME=baffile,param=['rho'],/SPECTRAL_FIELDS)
file="/u7/lb/Meris/gmv/case1_30_int_s1l2.baf"
myparam="view_zenith"
zone=[608,0,704,64]
res_tds=rd_baf(FILENAME=file,PARAM=[myparam],ZONE=zone)
zone=1
res_tds=rd_baf(FILENAME=file,PARAM=[myparam],ZONE=zone)
MODIFICATION HISTORY:
Created by Vincent Fournier-Sicre - vfs@acri.fr - December 1999
added AREA optional output - Uwe Kraemer - 10/2000
corrected standard output comment when zone is set - vfs - 23/10/2000
modified x0,y0,x1,y1 computation when ZONE is set - vfs - 23/10/2000
displaced the area limits computation - vfs - 23/10/2000
replaced 32 & 64 by Width_Bloc-1 and Height_Bloc-1 - vfs - 23/10/2000
suppresion of the AREA tag in the output structure, the zone
keyword is updated instead - vfs - 24/10/2000
(See $IDL_LOCAL/Products/rd_baf.pro)