Skip to content

Issue reading barebones #93

@sebkopf

Description

@sebkopf

Hi rawrr team, I'm encountering a problem with the "barebones" mode. Normal mode works great but I'm trying to read the spectra faster (without all the other information) and found the nice "barebones" mode you implemented. However, I cannot get it to work. Here's a small testfile to reproduce the issue with the reprex below. This happens for every scan (here just loading scan 1 as example). Is this the expected behaviour or some issue with my file or operating system or the barebones mode? Using the latest version of rawrr from main Github branch. This might be related to issue #84 but not entirely convinced it is.

# read in normal mode
rawrr::readSpectrum("nitrate_test_100scans.raw", scan = 1)[[1]]$mZ
#>   [1] 60.88833 60.88847 60.88861 60.88876 61.98376 61.98390 61.98405 61.98420
#>   [9] 61.98434 61.98449 61.98464 61.98478 61.98493 61.98507 61.98522 61.98537
#>  [17] 61.98551 61.98566 61.98581 61.98595 61.98610 61.98625 61.98639 61.98654
#>  [25] 61.98669 61.98683 61.98698 61.98712 61.98727 61.98742 61.98756 61.98771
#>  [33] 61.98786 61.98800 61.98815 61.98829 61.98844 61.98859 61.98873 61.98888
#>  [41] 61.98903 61.98917 61.98932 61.98947 61.98961 61.98976 61.98991 61.99005
#>  [49] 61.99020 61.99035 61.99049 61.99064 61.99079 61.99093 61.99108 61.99123
#>  [57] 61.99137 61.99152 61.99167 61.99181 61.99196 61.99211 61.99226 61.99240
#>  [65] 61.99255 62.92423 62.92438 62.92453 62.92468 62.92483 62.92498 62.92513
#>  [73] 62.92528 62.92543 62.92558 62.92573 62.92588 62.92603 62.98419 62.98434
#>  [81] 62.98449 62.98464 62.98479 62.98494 62.98509 62.98524 62.98539 62.98554
#>  [89] 62.98569 62.98584 62.98599 62.98614 62.98629 62.98644 62.98659 62.99154
#>  [97] 62.99169 62.99184 62.99199 62.99214 62.99229 62.99244 62.99259 62.99274
#> [105] 62.99289 62.99304 62.99320 62.99335 62.99350 62.99365 63.86023 63.86038
#> [113] 63.86054 63.86069 63.86084 63.86100 63.86115 63.86130 63.86145 63.86160
#> [121] 63.86176 63.86191 63.86206 63.99136 63.99151 63.99167 63.99182 63.99197
#> [129] 63.99213 63.99228 63.99244 63.99259 63.99274 63.99290 63.99305 63.99320
#> [137] 63.99337 63.99352 63.99368 63.99383 64.56105 64.56121 64.56137 64.56152
#> [145] 64.56168 64.56183 64.56199 64.56214 64.56230 64.56246 64.56261 64.56277
#> [153] 64.56292 65.65399 65.65415 65.65430 65.65446

# read in barebones mode
rawrr::readSpectrum("nitrate_test_100scans.raw", scan = 2, mode = "barebone")[[1]]$mZ
#> Warning: length of mZ value vector is less than 1.
#>  [1]  1  2  3  4  5  6  7  8  9 10

# system information
sessioninfo::platform_info()
#>  setting  value
#>  version  R version 4.5.0 (2025-04-11)
#>  os       macOS Sequoia 15.6.1
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/Denver
#>  date     2025-09-12
#>  pandoc   3.6.3 @ /Applications/Positron.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown)
#>  quarto   1.7.32 @ /Applications/Positron.app/Contents/Resources/app/quarto/bin/quarto

# rawrr version
packageVersion("rawrr")
#> [1] '1.17.11'

Created on 2025-09-12 with reprex v2.1.1

Here's the test file:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions