-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[bug]:read .0 file #118
Comments
Thank you @joe007li for letting us know! Those proprietary .0 files are tricky, indeed. See also wincowgerDEV/OpenSpecy-shiny#22. I was able to reproduce the error but I'll need more time to track it down. It also seems that there is no easy workaround. opusreader (https://github.com/pierreroudier/opusreader) produces a similar error when trying to read your file. |
Glad it was helpful. Wish we could implement a better function for reading
these in Open Specy but cracking proprietary files is one of the most
challenging reverse engineering feats we have on our list of things to do.
The more open file types like JDX and CSV are much better supported.
…On Fri, Oct 28, 2022, 4:53 PM joe007li ***@***.***> wrote:
Thanks for your solution. It was helpful.
I was able to reproduce the error, even with the new opus reader function
too.
One work around would be to use Spectragryph which is free for
noncommercial use and has larger support for file types, I was able to open
your file there. Then if you wanted to use our functions you could export
your spectra to a different file type. [image: image]
<https://user-images.githubusercontent.com/26821843/198285349-312caa3b-18b1-47fd-9303-ec82e2c122e3.png>
—
Reply to this email directly, view it on GitHub
<#118 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGMUJUZ7FS5A5JPLGE2GCALWFPSIHANCNFSM6AAAAAARBVOQW4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@zsteinmetz @wincowgerDEV @joe007li devtools::load_all()
#> ℹ Loading opusreader2
file <- system.file("extdata", "new_data", "OpenSpecy-package_issue118.0",
package = "opusreader2"
)
data <- read_opus(dsn = file)
#> Error: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b15-c40-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots. Created on 2023-11-07 with reprex v2.0.2 |
We'd like to support this in {opusreader2}. Since are polishing for a CRAN release this WE, we'll add it to our list for fixing. 🤞 @joe007li Could you post the required infos as shown in the error message into this issue? spectral-cockpit/opusreader2#95 Most important for now are the screenshots which will allow to have hints and checks for the reverse engineering process (you can use this recent issue as an example spectral-cockpit/opusreader2#94 (maybe we can even fix it in one shot. Thanks for pointing to the issue and we hope to fix it this WE :-) |
@philipp-baumann, thanks so much for checking this out :) Really wish I was better at reverse engineering binary files, you're a true artist. |
Sorry @philipp-baumann . This data file is from my cooperator, so I do not have any other information about the software and instrument. |
I'll see what we can do. |
Is there a possibility to ask this person for screenshots of all blocks? I currently don't have a Bruker spectrometer and direct access to the Bruker OPUS software. This would help a lot with reverse engineering, since I have encountered only Bruker NIRS and mid-IR data from FT-IR and not NMR so far. There is for sure a common structure but it's always helpful to have some more light in this proprietary darkness 😎 |
To be claerify, these data are Raman. I understand your strong desire to fix this issue. I can try to reach out them, but I am now graduated from school and no longer work with them, so I can not promise that they will give me the information. |
sure I understand. Thanks! |
Some update: The single channels work so far, for the remaining blocks we need screenshots to try-error parsing settings. {opusreader2} v0.6.0: see also https://github.com/spectral-cockpit/opusreader2/blob/main/NEWS.md library("opusreader2")
file <- "inst/extdata/new_data/issue118_OpenSpecy-package.0"
data <- read_opus(dsn = file)
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b15-c40-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b7-c132-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b23-c132-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b7-c4-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b23-c4-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b7-c132-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b23-c132-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b11-c132-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b27-c132-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b11-c4-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b27-c4-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b11-c132-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b27-c132-t1-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b31-c40-t0-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning: Unknown header entry.
#> The following 'composite key' is not yet mapped in the {opusreader2} key-value map of the header:
#> * "b0-c0-t8-a64"
#> We encourage your contribution to feature this new OPUS block by opening a new issue on
#> https://github.com/spectral-cockpit/opusreader2/issues
#> Please
#> 1. report reproducibly, using short code with {opusreader2}
#> (recommended: https://reprex.tidyverse.org)
#> 2. describe briefly
#> a) Bruker instrument used
#> b) equipment
#> c) measurement mode and spectral blocks saved (OPUS settings)
#> d) OPUS software version
#> e) your general workflow for spectroscopic diagnostics
#> 3. provide an example OPUS binary file uploaded for public access
#> on GitHub (best in issue)
#> 4. to facilitate widespread support of Bruker devices in open source
#> based infrastructure, show the data blocks as print screens in the
#> Bruker OPUS software (right-click in Viewer). Please upload the
#> contents of all OPUS blocks in individual screenshots.
#> Warning in get_meta_utc_datetime(timestamp): NAs introduced by coercion
names(data[[1]])
#> [1] "basic_metadata" "sc_ref_data_param" "sc_ref"
#> [4] "optics" "sample" "instrument"
#> [7] "history" "unknown"
sessionInfo()
#> R version 4.1.3 (2022-03-10)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 22.04.3 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=de_CH.UTF-8 LC_COLLATE=en_US.UTF-8
#> [5] LC_MONETARY=de_CH.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=de_CH.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=de_CH.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] opusreader2_0.6.0
#>
#> loaded via a namespace (and not attached):
#> [1] digest_0.6.33 withr_2.5.0 R.methodsS3_1.8.2 lifecycle_1.0.3
#> [5] magrittr_2.0.3 reprex_2.0.2 evaluate_0.22 rlang_1.1.1
#> [9] cli_3.6.1 rstudioapi_0.15.0 fs_1.6.3 R.utils_2.12.2
#> [13] R.oo_1.25.0 vctrs_0.6.3 styler_1.10.2 rmarkdown_2.24
#> [17] tools_4.1.3 R.cache_0.16.0 glue_1.6.2 purrr_1.0.2
#> [21] xfun_0.40 yaml_2.3.7 fastmap_1.1.1 compiler_4.1.3
#> [25] htmltools_0.5.6.1 knitr_1.43 Created on 2023-11-12 with reprex v2.0.2 |
Guidelines
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
I cannot read .0 file in our HPC system.
And I cannot understand what this error mean.
Steps to reproduce
...
Expected behavior
read the file
Attachments
Error in if (offset < 0 || offset > fileSize) stop("Invalid offset") :
missing value where TRUE/FALSE needed
The attachment is the file I used.
test.0.zip
Screenshots or Videos
Additional Information
No response
The text was updated successfully, but these errors were encountered: