Changes between Version 16 and Version 17 of Procedures/HyperspectralCalibrationCreation


Ignore:
Timestamp:
Jun 7, 2018, 5:01:59 PM (6 years ago)
Author:
asm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Procedures/HyperspectralCalibrationCreation

    v16 v17  
    2424=== Config file ===
    2525
    26 The master calibration scripts require a config file to supply a lot of their options. An example config file can be found under libarsfcal/supplementary. Keys must be in the format `key=value`, one per line. The file must contain a `[DEFAULT]` heading holding default values, an `[eagle]` heading holding keys for the Eagle calibration, a `[hawk]` heading holding keys for the Hawk calibration and a `[fenix]` heading holding keys for the Hawk calibration.
     26The calibration scripts require a config file. An example config file can be found under libarsfcal/supplementary. Keys must be in the format `key=value`, one per line. The file must contain a `[DEFAULT]` heading holding default values, an `[eagle]` heading holding keys for the Eagle calibration, a `[hawk]` heading holding keys for the Hawk calibration and a `[fenix]` heading holding keys for the Hawk calibration.
    2727
    2828Keys required under [DEFAULT]:
    2929
    30  * aplcal=<path to aplcal>
    31  * fast_bil_median=<path to fast_bil_median>
    32  * fityk=<path to cfityk>
    33  * linefile=<path to CSV file containing spectral lines>
    34  * lamp_index_file=<path to CSV file matching data file names to spectral lamps>
     30 * day=Name of the directory containing the data (Usually day and gain level if any, which usually will not happen example: day2)
     31 * aplcal=<path to aplcal> (Usually will be just: aplcal)
     32 * fast_bil_median=<path to fast_bil_median> (%(scriptdir)s/fast_bil_median)
     33 * fityk=<path to cfityk>(cfityk)
     34 * linefile=<path to CSV file containing spectral lines, the wavelengths of each spectral peak that each line provide> (Can be edited for new lamps)
     35 * lamp_index_file=<path to CSV file matching data file names to spectral lamps, usually named as lamp_lookup.csv>
     36A example of the lamp_index file is:
     37N16F3210,O
     38N16F3204,He
     39Usually on the lab will try to use always the same naming format for the data but you will have to check everything is correct and edit if needed). Example files for linefile, lamp_index_file and lampfile are all under libarsfcal/supplementary.
    3540
    36 Keys required under [eagle], [hawk] and [fenix]:
     41Keys required under [eagle], [hawk] and [fenix], you just need to edit the section you are going to use:
    3742
    3843 * number_of_pixels=<number of spectral pixels on sensor>
    39  * rawdir=<Directory containing raw data files>
     44 * rawdir=<Directory containing raw data files> 
    4045 * splitdir=<Directory in which to place split light/dark files>
    4146 * darkdir=<Directory in which to place dark corrected files>
    4247 * averagedir=<Directory in which to place averaged files>
    43  * outdir=<Directory in which to place output files>
    44  * sample_hdr_file=<Path to header file containing old wavelength scale>
    45  * lampfile=<Path to CSV file containing integrating sphere response for this sensor>
    46  * raw_radcal_file=<Path to raw file to start from to create radiometric calibration file>
     48 * outdir=<Directory in which to place output files> (You will need to create all the dirs before hand)
     49
     50
    4751
    4852Extra keys required for [fenix]:
    49 
    50  * lampfile_with_filter=<Path to CSV file containing integrating sphere response through blue filter for this sensor>
    51  * filter_radcal_file=<Path to blue filtered raw file to start from to create radiometric calibration file>
     53 * sample_hdr_file=<Path to header file containing old wavelength scale>
     54 * lampfile=<Path to CSV file containing integrating sphere response for this sensor> (csv calibrated file by Physics Lab every 2 years, keep updated)
     55 * lampfile_with_filter=<Path to CSV file containing integrating sphere response through blue filter for this sensor> (if used will improve the SWIR lines. If not used will have to specify the same than before)
     56 * raw_radcal_file=<Path to raw file to start from to create radiometric calibration file> (uniform)
     57 * filter_radcal_file=<Path to blue filtered raw file to start from to create radiometric calibration file> (if not used make a copy of the one with no-filter with a different name and point to it here)
    5258 * spectrum_break_band=<last pixel in VNIR>
    5359
    54 Example files for linefile, lamp_index_file and lampfile are all under libarsfcal/supplementary.
     60
    5561
    5662== Wavelength calibration ==
    5763
    58 This must be run first, since the radiometric calibration requires a wavelength calibration to tie the lamp data into. Note for Eagle and Fenix you may need to re-run gen_bandsets.py (see "Other scripts", below) with different settings in order to obtain bandset files for different spectral binning settings.
     64This must be run first, since the radiometric calibration requires a wavelength calibration to tie the lamp data into. To do this you will be using "cal_spectral.py". Note for Eagle and Fenix you may need to re-run gen_bandsets.py (see "Other scripts", below) with different settings in order to obtain bandset files for different spectral binning settings.
    5965
    6066'''Master script:''' cal_spectral.py
    6167
    62 Basic usage of this requires only the name of the config file as an argument. You may also want to use the following arguments:
     68Basic usage of this requires only the name of the config file as an argument. For the case of the fenix, in the best scenario you will need to use:
     69```
     70cal_spectral.py config_file -s fenix --hwhm
     71```
     72To specify that the sensor is Fenix and that the FWHMs read in the hdr are indeed hwhm rather than fwhm.
     73 You may also want to use the following arguments:
    6374
    6475 * -v: Verbose. Will print a lot more stuff but makes it easier to see if it's going wrong.