OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_cal_rvs.c
Go to the documentation of this file.
1 #include "viirs_sim_sdr.h"
2 
3 int get_cal_rvs(char *file, int ham, int line, int ipix, rvs)
4 /*-----------------------------------------------------------------------------
5  Routine: get_cal_rvs.c
6 
7  Description: provide the rvs value for all bands and the 2 gain states
8  for a particular ham side and unaggregated pixel along scan
9 
10  Returns type: int - 0 if good, else I/O error
11 
12  Arguments:
13  Type Name I/O Description
14  ---- ---- --- -----------
15  char * file I calibration file name
16  int ham I the ham side for this scan
17  int line I detector number to access
18  int ipix I unaggregated pixel number, can be negative
19  for a along scan margin
20  float * rvs O RVS for the pixel, detector and ham side,
21  for all bands
22 
23  Modification history:
24 
25  W. Robinson, SAIC 16 Sep 2010 Original development
26 
27 ----------------------------------------------------------------------------*/ {
28  /*
29  * read in all the info from the hdf file
30  */
31  if (first_time) {
32  /*
33  * do mallocs for the space to read in the coefficients
34  */
35  rvs_a0
36 
37  rvs_a1
38 
39  rvs_a2
40  /*
41  * open the hdf 5 file with the gain info and get the data
42  */
43  open
44 
45  read rvs_a0
46 
47  read rvs_a1
48 
49  read rvs_a2
50  /*
51  * finish up with file
52  */
53  close
54  }
55  /*
56  * get the AOI from the pixel number
57  */
59  /*
60  * transfer the correct values for specific ham, detector, and AOI
61  */
62  for (ibnd = 0; ibnd <#bands; ibnd++ )
63  {
64  *(rvs + ibnd) = *(a0 + INDEX ?) + *(a1 + INDEX ?) * aoi +
65  *(a2 + INDEX ?) * aoi * aoi;
66  }
67  return 0;
68 }
#define INDEX(iw, isol, iphi, isen)
Definition: aerosol.c:642
int get_cal_rvs(char *file, int ham, int line, int ipix, rvs)
Definition: get_cal_rvs.c:3
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 file
Definition: HISTORY.txt:413
#define VIR_SCAN_AOI
Definition: viirs_sim_sdr.h:54
int vir_xf_scan(float, int, int, float *)
Definition: vir_xf_scan.c:3
#define VIR_SCAN_UASMP
Definition: viirs_sim_sdr.h:52