ocssw
V2022
|
read_aviris.c
Go to the documentation of this file.
136 //printf("Date:utc=%f sec=%f minute=%d (utc-hour)x60=%d \n",data->utc[i],data->sec,data->min,data->hour );
175 aviris4ocia_t *open_aviris(char *filename, char *imgfile, char *navfile, char *gainfile, aviris4ocia_t **data) {
288 // fprintf(stderr,"-E- %s line %d: unable to read all of the required metadata from AVIRIS file\n",
434 fprintf(stderr, "-E- %s line %d: unable to read all of the required metadata from AVIRIS file\n",
549 printf("Wrong data read size: want %d got %d in file %s\n", temp->wgs_nscan*num, status, infile);
572 dist[j] = (double) angular_distance((double) xlat[j], (double) xlon[j], (double) temp->lat0, (double) temp->lon0);
573 //printf("RJH: elev[%d]=%lf dist=%lf lat=%f lon=%f lat0=%lf lon0=%lf\n",j,elev[j],dist[j],xlat[j],xlon[j], temp->lat0, temp->lon0);
581 // printf("sort:RJH: elev[%d]=%lf dist=%lf lat=%f lon=%f lat0=%lf lon0=%lf\n",j,elev[j],dist[j],xlat[j],xlon[j], temp->lat0, temp->lon0);
612 fprintf(stderr, "-E- %s line %d: AVIRIS Wrong sensor and solar data read size: want %d got %d\n",
753 // printf("Date:utc=%f sec=%f minute=%d (utc-hour)*60=%f ",data->utc[recnum][k],sec,minute,(data->utc[recnum][k] - hour)*60 );
766 data->scantime = ymds2unix(data->year, data->month, data->day, (hour * 3600 + minute * 60 + sec));
772 data->lon[recnum * npix + ip] = data->easting + ip * cos(deg2rad(data->rotation)) * data->pixelSize - recnum * sin(deg2rad(data->rotation)) * data->pixelSize; // starts in upper left corner
773 data->lat[recnum * npix + ip] = data->northing - ip * sin(deg2rad(data->rotation)) * data->pixelSize - recnum * cos(deg2rad(data->rotation)) * data->pixelSize;
778 if (data->senz[recnum * npix + ip] <= skip) data->senz[recnum * npix + ip] = getValidAngleB(&data->senz[recnum * npix], npix, skip, &validSenz);
779 if (data->sena[recnum * npix + ip] <= skip) data->sena[recnum * npix + ip] = getValidAngleB(&data->sena[recnum * npix], npix, skip, &validSena);
780 if (data->solz[recnum * npix + ip] <= skip) data->solz[recnum * npix + ip] = getValidAngleB(&data->solz[recnum * npix], npix, skip, &validSolz);
781 if (data->sola[recnum * npix + ip] <= skip) data->sola[recnum * npix + ip] = getValidAngleB(&data->sola[recnum * npix], npix, skip, &validSola);
791 dist = (float) angular_distance((double) data->lat[recnum * npix + ip], (double) data->lon[recnum * npix + ip], (double) data->lat0, (double) data->lon0);
813 status = readBinScanLine4ocia_int2(data->Lt, recnum, data->npix, data->gain, data->numBands, data->numBands, data->interleave, swap, data->av_fp);
831 int checkAvProcessFile(char *filename, char *hdrfile, char *imgfile, char *navfile, char *gainfile, int itemsize) {
real(single), dimension(:,:), allocatable longitude
Definition: core_arrays.f90:137
void nav_gd_orient(float *pos, float *vel, float *att, float *smat[], float *coef)
Definition: get_zenaz.c:160
void nav_get_geonav(float *sunr, float *pos, float *pview, float *coef, float *smat[], float *xlon, float *xlat, float *solz, float *sola, float *senz, float *sena)
Definition: get_zenaz.c:310
aviris4ocia_t * open_aviris(char *filename, char *imgfile, char *navfile, char *gainfile, aviris4ocia_t **data)
Definition: read_aviris.c:175
real(single), dimension(:,:), allocatable latitude
Definition: core_arrays.f90:136
int readBinScanLine4ocia_int2(float *Lt, int32_t recnum, int32_t npix, double *gain, int nbands, int numBands, int interleave, int swap, FILE *ptr)
Definition: jplaeriallib.c:125
void cdata_()
void unix2yds(double usec, short *year, short *day, double *secs)
float getValidAngleB(float *ang, int32_t npix, int32_t skip, float *fillangle)
Definition: read_aviris.c:38
instead the metadata field ProcessingEnvinronment is filled in from the output of a call to the POSIX compliant function uname from within the L1B code A small bug in L1B_Tables an incorrect comparison of RVS coefficients for TEBs to RVS coefficients for RSBs was being made This was replaced with a comparison between TEB coefficients This error never resulted in an incorrect RVS correction but did lead to recalculating the coefficients for each detector in a thermal band even if the coefficients were the same for all detectors To reduce to overall size of the reflective LUT HDF fill values were eliminated from all LUTs previously dimensioned where and where NUM_TIMES is the number of time dependent table pieces In Preprocess a small error where the trailing dropped scan counter was incremented when the leading dropped scan counter should have been was fixed This counter is internal only and is not yet used for any chiefly to casting of were added to make it LINUX compatible Output of code run on LINUX machines displays differences of at most scaled sector rotation
Definition: HISTORY.txt:575
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
Definition: HISTORY.txt:356
int checkAvProcessFile(char *filename, char *hdrfile, char *imgfile, char *navfile, char *gainfile, int itemsize)
Definition: read_aviris.c:831
void ymdhms2ydmsec(int yy, int mm, int dd, int hh, int mn, int sc, int32_t *year, int32_t *day, int32_t *msec)
Definition: ydhms2ydmsec.c:3
string hdrfile
Definition: interpolateFields2hicotimes.py:806
double angular_distance(double lat1, double lon1, double lat2, double lon2)
Definition: read_prism.c:537
PARAM_TYPE_NONE Default value No parameter is buried in the product name name_prefix is case insensitive string compared to the product name PARAM_TYPE_VIS_WAVE The visible wavelength bands from the sensor are buried in the product name The product name is compared by appending and name_suffix ie aph_412_giop where prod_ix will be set to PARAM_TYPE_IR_WAVE same search method as PARAM_TYPE_VIS_WAVE except only wavelength above are looped through but prod_ix is still based ie aph_2_giop for the second and prod_ix set to PARAM_TYPE_INT name_prefix is compared with the beginning of the product name If name_suffix is not empty the it must match the end of the product name The characters right after the prefix are read as an integer and prod_ix is set to that number strncpy(l2prod->name_prefix, "myprod", UNITLEN)
void aviris4ocia_proj4_convert(aviris4ocia_t *data, int32_t numPoints, double *x, double *y)
Definition: read_aviris.c:50
double ymds2unix(short year, short month, short day, double secs)
void get_nav_data(char *navfile, int32_t nscans, int32_t npix, aviris4ocia_t *data)
Definition: read_aviris.c:67
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
Definition: HISTORY.txt:464
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
int sunpos(double tjd, double r[3], char **errstr)
void nav_get_vel(float ilat, float mlat, float ilon, float mlon, float *vel)
Definition: get_zenaz.c:105
void l_sun_(int *iyr, int *iday, double *sec, float *sunr, float *rs)