Changes between Version 16 and Version 17 of Procedures/HyperspectralCalibrationCreation
- Timestamp:
- Jun 7, 2018, 5:01:59 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Procedures/HyperspectralCalibrationCreation
v16 v17 24 24 === Config file === 25 25 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.26 The 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. 27 27 28 28 Keys required under [DEFAULT]: 29 29 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> 36 A example of the lamp_index file is: 37 N16F3210,O 38 N16F3204,He 39 Usually 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. 35 40 36 Keys required under [eagle], [hawk] and [fenix] :41 Keys required under [eagle], [hawk] and [fenix], you just need to edit the section you are going to use: 37 42 38 43 * number_of_pixels=<number of spectral pixels on sensor> 39 * rawdir=<Directory containing raw data files> 44 * rawdir=<Directory containing raw data files> 40 45 * splitdir=<Directory in which to place split light/dark files> 41 46 * darkdir=<Directory in which to place dark corrected files> 42 47 * 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 47 51 48 52 Extra 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) 52 58 * spectrum_break_band=<last pixel in VNIR> 53 59 54 Example files for linefile, lamp_index_file and lampfile are all under libarsfcal/supplementary. 60 55 61 56 62 == Wavelength calibration == 57 63 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.64 This 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. 59 65 60 66 '''Master script:''' cal_spectral.py 61 67 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: 68 Basic 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 ``` 70 cal_spectral.py config_file -s fenix --hwhm 71 ``` 72 To 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: 63 74 64 75 * -v: Verbose. Will print a lot more stuff but makes it easier to see if it's going wrong.