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

Support OPUS files with normalization in AB block #81

Closed
Debora6991 opened this issue Mar 20, 2023 · 20 comments
Closed

Support OPUS files with normalization in AB block #81

Debora6991 opened this issue Mar 20, 2023 · 20 comments
Labels
opus-data-support Support new OPUS instrument, block type, OPUS version etc.

Comments

@Debora6991
Copy link

Hi!
I obtain this error when I try to read my OPUS files both with the single and multiple read approach,

image

image
I am using an old TENSOR 27 FTIR spectrometer, equipped with HTS-XT accessory (OPUS 6.5)
What should I do?

@philipp-baumann
Copy link
Member

Hi @Debora6991 , could you upload your example OPUS file, e.g. "A1.1.0"

@Debora6991
Copy link
Author

Debora6991 commented Mar 20, 2023 via email

@philipp-baumann
Copy link
Member

Hi Debora, which email did you send it to?

@Debora6991
Copy link
Author

I answered directly by email because here the format file is not allowed. this is the e-mail address that appears
[email protected].

Is this right? where should I attach the .0 OPUS file?

@philipp-baumann
Copy link
Member

gosh stupid github, it used to support random binary files ;-) can you please send an email to spectral-cockpit at protonmail dot com ? thanks

@Debora6991
Copy link
Author

e-mail sent.
Thankyou!

@philipp-baumann
Copy link
Member

philipp-baumann commented Mar 20, 2023

got it! I'll give it a try this week. Could you please add screenshots of the OPUS software view (as described in informative message?) thanks (ATM do not have a direct access to the software)

@Debora6991
Copy link
Author

Debora6991 commented Mar 20, 2023 via email

@philipp-baumann
Copy link
Member

philipp-baumann commented Mar 20, 2023

would be nice to have all spectral blocks screenshotted (right click on file...) :-) => here is a brief example: #58
easiest would be just pasting screenshot images here.

@philipp-baumann
Copy link
Member

I want to just make sure everything we parse is double-checked on the OPUS side.

@Debora6991
Copy link
Author

Debora6991 commented Mar 20, 2023 via email

@philipp-baumann
Copy link
Member

Hi Debora, I do not see any images in your response above. Can you send them to me via mail?

@philipp-baumann
Copy link
Member

alternatively, can you give me a brief info here what all the block names are? I need an extra block type if you want your setting to be supported.

@philipp-baumann philipp-baumann changed the title Cannot open OPUS normalized spectra New OPUS file with setup that cannot be opened Mar 21, 2023
@philipp-baumann
Copy link
Member

philipp-baumann commented Mar 23, 2023

@Debora6991 I think you did an email, but I did not receive, because it went to some GitHub address. If you want, I can post screenshots the file settings here? Respectively, I am in Zurich today early evening and could have access to OPUS software in a lab at ETH Zürich.

@Debora6991
Copy link
Author

Debora6991 commented Mar 23, 2023 via email

@philipp-baumann
Copy link
Member

I sent the mail again (spectral-cockpit protonmail....), did it work?

On Thu, Mar 23, 2023, 11:35 Philipp Baumann @.> wrote: @Debora6991 https://github.com/Debora6991 I think you did an email, but I did not receive, because it went to some GitHub address. If you want, I can post screenshots the file settings here? — Reply to this email directly, view it on GitHub <#81 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCFBHY3JOTBO5KD24A3BMDW5QRQHANCNFSM6AAAAAAWAYQ56U . You are receiving this because you were mentioned.Message ID: @.>

awesome, it got it. Will keep you posted.

@philipp-baumann philipp-baumann changed the title New OPUS file with setup that cannot be opened Support OPUS files with normalization in AB block Mar 25, 2023
@Debora6991
Copy link
Author

Debora6991 commented Mar 25, 2023 via email

@philipp-baumann
Copy link
Member

just a short info to let you know. I am currently underway with my bike travelling. Eventually I have time I might push the necessary changes, but it can also be June until I am able to do so. Cheers

@philipp-baumann philipp-baumann added the opus-data-support Support new OPUS instrument, block type, OPUS version etc. label Nov 10, 2023
@philipp-baumann
Copy link
Member

Hi @Debora6991 finally there is a fix for your issue :-)
With version 0.6.1 (see ) it should now work (see here https://github.com/spectral-cockpit/opusreader2/blob/main/NEWS.md )

library("opusreader2")
file <- "inst/extdata/new_data/issue81_A1.1.0"
data <- read_opus(dsn = file)
names(data[[1]])
#>  [1] "basic_metadata"            "ab_no_atm_comp_data_param"
#>  [3] "ab_no_atm_comp"            "sc_sample_data_param"     
#>  [5] "sc_sample"                 "sc_ref_data_param"        
#>  [7] "sc_ref"                    "optics"                   
#>  [9] "optics_ref"                "fourier_transformation"   
#> [11] "sample"                    "acquisition"              
#> [13] "instrument_ref"            "instrument"               
#> [15] "lab_and_process_param_raw" "info_block"               
#> [17] "quality_test_report"       "history"
data[[1]]$quality_test_report
#> $block_type
#> [1] 15
#> 
#> $channel_type
#> [1] 16
#> 
#> $text_type
#> [1] 96
#> 
#> $additional_type
#> [1] 0
#> 
#> $offset
#> [1] 28440
#> 
#> $next_offset
#> [1] 31200
#> 
#> $chunk_size
#> [1] 2760
#> 
#> $block_type_name
#> [1] "quality_test_report"
#> 
#> $parameters
#> $parameters$BID
#> $parameters$BID$parameter_name
#> [1] "BID"
#> 
#> $parameters$BID$parameter_name_long
#> NULL
#> 
#> $parameters$BID$parameter_value
#> [1] 6295567
#> 
#> $parameters$BID$parameter_type
#> [1] "int"
#> 
#> 
#> $parameters$NRP
#> $parameters$NRP$parameter_name
#> [1] "NRP"
#> 
#> $parameters$NRP$parameter_name_long
#> NULL
#> 
#> $parameters$NRP$parameter_value
#> [1] 1
#> 
#> $parameters$NRP$parameter_type
#> [1] "int"
#> 
#> 
#> $parameters$SIZ
#> $parameters$SIZ$parameter_name
#> [1] "SIZ"
#> 
#> $parameters$SIZ$parameter_name_long
#> NULL
#> 
#> $parameters$SIZ$parameter_value
#> [1] 124
#> 
#> $parameters$SIZ$parameter_type
#> [1] "int"
#> 
#> 
#> $parameters$TIT
#> $parameters$TIT$parameter_name
#> [1] "TIT"
#> 
#> $parameters$TIT$parameter_name_long
#> NULL
#> 
#> $parameters$TIT$parameter_value
#> [1] "Quality Test Report"
#> 
#> $parameters$TIT$parameter_type
#> [1] "str"
#> 
#> 
#> $parameters$E00
#> $parameters$E00$parameter_name
#> [1] "E00"
#> 
#> $parameters$E00$parameter_name_long
#> NULL
#> 
#> $parameters$E00$parameter_value
#> [1] "Quality Test Report"
#> 
#> $parameters$E00$parameter_type
#> [1] "str"
#> 
#> 
#> $parameters$F00
#> $parameters$F00$parameter_name
#> [1] "F00"
#> 
#> $parameters$F00$parameter_name_long
#> NULL
#> 
#> $parameters$F00$parameter_value
#> [1] 2012
#> 
#> $parameters$F00$parameter_type
#> [1] "int"
#> 
#> 
#> $parameters$Z00
#> $parameters$Z00$parameter_name
#> [1] "Z00"
#> 
#> $parameters$Z00$parameter_name_long
#> NULL
#> 
#> $parameters$Z00$parameter_value
#> [1] 748
#> 
#> $parameters$Z00$parameter_type
#> [1] "int"
#> 
#> 
#> 
#> attr(,"class")
#> [1] "parameter"

Created on 2023-11-12 with reprex v2.0.2

@philipp-baumann
Copy link
Member

It was a new parameter block, calling "quality_test_report", which probably exists due to a OPUS macro used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opus-data-support Support new OPUS instrument, block type, OPUS version etc.
Projects
None yet
Development

No branches or pull requests

2 participants