Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working on supporting time-resolved spectra #70

Closed
wants to merge 19 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions R/create_dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,56 +32,98 @@ create_dataset <- function(header_data) {
# guess general text
"b0-c0-t\\d+-a(0|64)" = c(read_class = "text", block_type_name = "text_information"),

# new key for time-resolved spectra
"b0-c28-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved0_c28"),

# block code 7 -----------------------------------------------------------------------------
# spectrum types of sample
"b7-c4-t0-a(0|64)" = c(read_class = "data", block_type_name = "sc_sample"),

# new keys for time-resolved spectra
"b7-c4-t80-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved7_c4"),
"b7-c8-t80-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved7_c8"),
"b7-c8-t0-a(0|64)" = c(read_class = "data", block_type_name = "ig_sample"),
"b7-c12-t0-a(0|64)" = c(read_class = "data", block_type_name = "ph_sample"),

# new keys for time-resolved spectra
"b7-c132-t80-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved7_c132"),
"b7-c136-t80-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved7_c136"),

# block code 11 ----------------------------------------------------------------------------
# spectrum types of reference (background)
"b11-c4-t0-a(0|64)" = c(read_class = "data", block_type_name = "sc_ref"),
"b11-c8-t0-a(0|64)" = c(read_class = "data", block_type_name = "ig_ref"),
"b11-c12-t0-a(0|64)" = c(read_class = "data", block_type_name = "ph_ref"),

# new keys for time-resolved spectra
"b11-c132-t0-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved11_c132"),
"b11-c136-t0-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved11_b136"),

# block code 15 -----------------------------------------------------------------------------
# spectrum report blocs
# channel code 15: save (apparent) absorbance
"b15-c16-t112-a0" = c(read_class = "parameter", block_type_name = "quant_report_ab"),
"b15-c16-t104-a1" = c(read_class = "parameter", block_type_name = "me_test_report_ab"),
"b15-c16-t0-a64" = c(read_class = "data", block_type_name = "ab_no_atm_comp"),
"b15-c16-t0-a0" = c(read_class = "data", block_type_name = "ab"),
# new key for time-resolved spectra
"b15-c16-t80-a0" = c(read_class = "text", block_type_name = "unknown_timeresolved15_c16"),
# channel code 48: save reflectance (settings
"b15-c48-t112-a0" = c(read_class = "parameter", block_type_name = "quant_report_refl"),
"b15-c48-t104-a1" = c(read_class = "parameter", block_type_name = "me_test_report_refl"), # check "a1"
"b15-c48-t0-a64" = c(read_class = "data", block_type_name = "refl_no_atm_comp"),
"b15-c48-t0-a0" = c(read_class = "data", block_type_name = "refl"),
# channel code 88 and 216: spectra matching
"b15-c88-t0-a(0|64)" = c(read_class = "data", block_type_name = "match"),

# new key for time-resolved spectra
"b15-c144-t80-a0" = c(read_class = "data", block_type_name = "unknown_timeresolved15_c144"),
"b15-c216-t0-a(0|64)" = c(read_class = "data", block_type_name = "match_2_chn"),

# block code 16 -----------------------------------------------------------------------------
# new key for time-resolved spectra
# tbd check `read_class`
"b16-c28-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved16"),

# block code 23 -----------------------------------------------------------------------------
# data parameters (metadata) for spectrum types of sample
"b23-c4-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "sc_sample_data_param"),
"b23-c8-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "ig_sample_data_param"),
"b23-c12-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "ph_sample_data_param"),

# new keys for time-resolved spectra
"b23-c4-t80-a0" = c(read_class = "text", block_type_name = "unknown_timeresolved23_c4"),
"b23-c8-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved23_c8"),
"b23-c132-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved23_c132"),
"b23-c136-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved23_c136"),

# block code 27 -----------------------------------------------------------------------------
# data parameters (metadata) for spectrum types of reference (background)
"b27-c4-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "sc_ref_data_param"),
"b27-c8-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "ig_ref_data_param"),
"b27-c12-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "ph_ref_data_param"),

# new keys for time-resolved spectra
"b27-c132-t0-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved27_c132"),
"b27-c136-t0-a0" = c(read_class = "text", block_type_name = "unknown_timeresolved27_c136"),

# block code 31 -----------------------------------------------------------------------------
# data parameters (metadata) when spectra (normalized single channels) saved in apparent absorbance
"b31-c16-t0-a64" = c(read_class = "parameter", block_type_name = "ab_no_atm_comp_data_param"),
"b31-c16-t0-a0" = c(read_class = "parameter", block_type_name = "ab_data_param"),

# new key for time-resolved spectra
"b31-c16-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved31_c16"),

# data parameters (metadata) when spectra (normalized single channels) saved in reflectance
"b31-c48-t0-a64" = c(read_class = "parameter", block_type_name = "refl_no_atm_comp_data_param"),
"b31-c48-t0-a0" = c(read_class = "parameter", block_type_name = "refl_data_param"),

# data parameters (metadata) for spectra matching
"b31-c88-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "match_data_param"),

# new key for time-resolved spectra
"b31-c144-t80-a0" = c(read_class = "parameter", block_type_name = "unknown_timeresolved31_c144"),
"b31-c216-t0-a(0|64)" = c(read_class = "parameter", block_type_name = "match_2_chn_data_param"),

## General metadata blocks
Expand Down