Find default instrument descriptor and correction method based on spectrometer serial number and entrance optics.
Usage
instr_defaults(
serial_no,
entrance.optics = "cosine",
date = lubridate::now(tzone = "UTC"),
descriptor = NA,
correction.method = NA
)
default_descriptor(
serial_no,
entrance.optics = "cosine",
date = lubridate::now(tzone = "UTC"),
descriptor = NA
)
default_method(serial_no, correction.method = NA, descriptor = NA)Arguments
- serial_no
character The serial number of an Ocean Optics spectrometer for which data is available in 'ooacquire'.
- entrance.optics
character, name or geometry of diffuser, needed only if there is more than one for the same instrument.
- date
Any object that
anytime::anydate()will decode as a date or convert to a date. Used to select a descriptor containing calibration data valid for the date when data was acquired.- descriptor
instr_desc A list-derived object describing a specific spectrometer.
- correction.method
list The method to use when applying the calibration
Details
When protocols or descriptor is not available
(NA), the missing value is replaced by a default based on the
arguments passed to serial_no, entrance.optics, and
protocols.
See also
Other Functions and methods related to instrument descriptors.:
files_rm_jwrapper(),
files_s_irrad_update(),
rm_jwrapper(),
update_bad_pixs()
Examples
str(
default_descriptor(serial_no = "MAYP114590",
date = lubridate::ymd("2020-01-01"))
)
#> List of 18
#> $ time : logi NA
#> $ sr.index : int 0
#> $ ch.index : int 0
#> $ spectrometer.name: chr "MayaPro2000"
#> $ spectrometer.sn : chr "MAYP114590"
#> $ bench.grating : chr "HC1"
#> $ bench.filter : chr "000"
#> $ bench.slit : chr "010"
#> $ num.pixs : int 2068
#> $ num.dark.pixs : int 8
#> $ min.integ.time : int 7200
#> $ max.integ.time : int 1600000000
#> $ max.counts : int 64000
#> $ wavelengths : num [1:2068] 199 199 200 200 201 ...
#> $ wl.range : num [1:2] 199 1114
#> $ bad.pixs : num(0)
#> $ inst.calib :List of 11
#> ..$ nl.coeff : num [1:8] 1.00 1.07e-07 -1.38e-11 -3.66e-16 5.76e-20 ...
#> ..$ nl.fun :function (x)
#> .. ..- attr(*, "srcref")= 'srcref' int [1:8] 27 34 27 63 34 63 4356 4356
#> .. .. ..- attr(*, "srcfile")=Classes 'srcfilealias', 'srcfile' <environment: 0x00000283df83daf0>
#> ..$ straylight.coeff: num 0
#> ..$ straylight.slope: num 0
#> ..$ wl.fun :function (x)
#> ..$ slit.fun : logi NA
#> ..$ irrad.mult : num [1:2068] 0 0 0 0 0 ...
#> ..$ start.date : POSIXct[1:1], format: "2019-08-06"
#> ..$ end.date : POSIXct[1:1], format: "2023-08-06"
#> ..$ wl.range : num [1:2] 230 1050
#> ..$ cal.source : chr "cal_201908"
#> $ entrance.optics :List of 6
#> ..$ make : chr "Bentham Instruments"
#> ..$ model : chr "D7-H-SMA"
#> ..$ geometry : chr "cosine"
#> ..$ serial.number: chr NA
#> ..$ area : num 7.85e-05
#> ..$ fibre : chr NA
str(
default_method(serial_no = "MAYP114590")
)
#> List of 12
#> $ name : chr "MAYP114590_simple.mthd"
#> $ correction : chr "simple"
#> $ spectrometer.sn : chr "MAYP114590"
#> $ stray.light.method: chr "simple"
#> $ stray.light.wl : num [1:2] 218 228
#> $ flt.dark.wl : num [1:2] 205 219
#> $ flt.ref.wl : num [1:2] 368 388
#> $ flt.Tfr : num 1
#> $ inst.dark.pixs : int [1:3] 2 3 4
#> $ tail.coeffs : num [1:2] NA NA
#> $ worker.fun : NULL
#> $ trim : num 0.05
str(
instr_defaults(serial_no = "MAYP114590",
date = lubridate::ymd("2020-01-01"))
)
#> List of 2
#> $ descriptor :List of 18
#> ..$ time : logi NA
#> ..$ sr.index : int 0
#> ..$ ch.index : int 0
#> ..$ spectrometer.name: chr "MayaPro2000"
#> ..$ spectrometer.sn : chr "MAYP114590"
#> ..$ bench.grating : chr "HC1"
#> ..$ bench.filter : chr "000"
#> ..$ bench.slit : chr "010"
#> ..$ num.pixs : int 2068
#> ..$ num.dark.pixs : int 8
#> ..$ min.integ.time : int 7200
#> ..$ max.integ.time : int 1600000000
#> ..$ max.counts : int 64000
#> ..$ wavelengths : num [1:2068] 199 199 200 200 201 ...
#> ..$ wl.range : num [1:2] 199 1114
#> ..$ bad.pixs : num(0)
#> ..$ inst.calib :List of 11
#> .. ..$ nl.coeff : num [1:8] 1.00 1.07e-07 -1.38e-11 -3.66e-16 5.76e-20 ...
#> .. ..$ nl.fun :function (x)
#> .. .. ..- attr(*, "srcref")= 'srcref' int [1:8] 27 34 27 63 34 63 4356 4356
#> .. .. .. ..- attr(*, "srcfile")=Classes 'srcfilealias', 'srcfile' <environment: 0x00000283df83daf0>
#> .. ..$ straylight.coeff: num 0
#> .. ..$ straylight.slope: num 0
#> .. ..$ wl.fun :function (x)
#> .. ..$ slit.fun : logi NA
#> .. ..$ irrad.mult : num [1:2068] 0 0 0 0 0 ...
#> .. ..$ start.date : POSIXct[1:1], format: "2019-08-06"
#> .. ..$ end.date : POSIXct[1:1], format: "2023-08-06"
#> .. ..$ wl.range : num [1:2] 230 1050
#> .. ..$ cal.source : chr "cal_201908"
#> ..$ entrance.optics :List of 6
#> .. ..$ make : chr "Bentham Instruments"
#> .. ..$ model : chr "D7-H-SMA"
#> .. ..$ geometry : chr "cosine"
#> .. ..$ serial.number: chr NA
#> .. ..$ area : num 7.85e-05
#> .. ..$ fibre : chr NA
#> $ correction.method:List of 12
#> ..$ name : chr "MAYP114590_simple.mthd"
#> ..$ correction : chr "simple"
#> ..$ spectrometer.sn : chr "MAYP114590"
#> ..$ stray.light.method: chr "simple"
#> ..$ stray.light.wl : num [1:2] 218 228
#> ..$ flt.dark.wl : num [1:2] 205 219
#> ..$ flt.ref.wl : num [1:2] 368 388
#> ..$ flt.Tfr : num 1
#> ..$ inst.dark.pixs : int [1:3] 2 3 4
#> ..$ tail.coeffs : num [1:2] NA NA
#> ..$ worker.fun : NULL
#> ..$ trim : num 0.05
