pymcaroitool(1)

πŸ“¦
version 5.9.4 Β· 2 versions
, in debian trixie, fedora 43, fedora 44, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… pymcaroitool β€” the PyMca region-of-interest imaging X application, bestie edition

okay so real talk: this is the manual page for pymcaroitool, part of the PyMca X-Ray Fluorescence Toolkit, and it's genuinely one of those tools that looks scary until someone explains it to you in a normal voice. that someone is me. sit down, grab a strawberry πŸ“, and let's go.


✨ NAME ✨

pymcaroitool β€” the PyMca region-of-interest imaging X application. that's the whole vibe. it does ROI imaging. iconic behavior honestly.


πŸ¦‹ SYNOPSIS πŸ¦‹

pymcaroitool [OPTIONS]... [FILE(S)]

that's it. options, then files, in that order. slay.


πŸ‘‘ DESCRIPTION πŸ‘‘

this launches the graphical user interface of the PyMca X-Ray Fluorescence Toolkit region-of-interest imaging tool. yes, a whole GUI. no, you don't have to touch the terminal after this. πŸŽ€

this tool is best suited for handling datasets that can be represented by three-dimensional arrays. the classic cases, and I mean the classics:

  • stacks of images β€” where the first dimension is the image number
  • 2D maps of 1D spectra β€” where the last dimension is the spectrum channel number

what does it actually do for you? two things, and both are lowkey the main character:

  • it lets you display maps of particular regions of the spectra
  • it lets you display spectra of a particular region of the map

the way that's symmetric?? obsessed. πŸ”₯

and there's a system of plugins that lets you extend what this tool can do. good news: plugins for multivariate analysis are already built in, so you don't have to go hunting. they're just there. periodt.

last thing: if FILE is given, it will be opened in the program provided its format is supported. if the format isn't supported... well. it won't be opened. πŸ™ˆ


🌸 EXAMPLES 🌸

🧚 pymcaroitool

pymcaroitool

starts the program with a file browser so you can go pick your input files yourself. very choose-your-own-adventure of it.

πŸ’œ pymcaroitool --binding=XX

pymcaroitool --binding=XX

starts the program using the selected Qt binding. XX has to be one of these four, no substitutions:

  • PyQt5 β€” this one is the default
  • PyQt6
  • PySide6
  • PySide2

⭐ pymcaroitool file_0001.edf

pymcaroitool file_0001.edf

tries to open the file named file_0001.edf and all indexed files of the form file_????.edf where ???? is a number. so it's not just grabbing one file, bestie, it's grabbing the whole little family. 🫢

🌈 pymcaroitool --imagestack=1 file_0001.edf

pymcaroitool --imagestack=1 file_0001.edf

same deal β€” tries to open file_0001.edf and all indexed files of the form file_????.edf where ???? is a number β€” but this time as a set of images. stack 'em up. πŸ“š

πŸŽ€ pymcaroitool uncompressed_tiff_file_0001.tif

pymcaroitool uncompressed_tiff_file_0001.tif

tries to open a series of uncompressed TIFF files as an image stack. note the word uncompressed β€” it's doing heavy lifting, don't ignore it. πŸ’€

πŸ’– pymcaroitool --begin=100 --end=200 --filepattern=file_%05d.edf

pymcaroitool --begin=100 --end=200 --filepattern=file_%05d.edf

starts the program loading the single indexed files from file_00100.edf to file_00200.edf. clean. precise. no notes.

πŸ¦‹ pymcaroitool --begin=10,100 --end=20,200 --filepattern=row%d_col%04d.dat

pymcaroitool --begin=10,100 --end=20,200 --filepattern=row%d_col%04d.dat

loads the double indexed files from row10_col0100.dat, row10_col0101.dat, ... to row20_col0199.dat, row20_col0200.dat. two indices, two comma-separated values. the math is mathing. ✨

πŸ”₯ pymcaroitool --logging=XX

pymcaroitool --logging=XX

sets the logging level. allowed values, listed in increasing order of verbosity:

  • critical
  • error
  • warning β€” this is the default
  • info
  • debug

alternatively, you can specify a value in range 0 (critical) to 4 (debug). so 0 is critical, 4 is debug, and everything in between lines up accordingly. choose your own adventure. 🌟


πŸ’€ CAVEATS πŸ’€

pay attention here, this one bites:

if files f_000.xxx and f_001.xxx are present in the same directory, and only one of them is selected, the program will always try to load both of them unless a cumbersome way using a file pattern is used.

so yeah. it's giving "I only asked for one." 😭 the file pattern workaround exists, but the manpage itself calls it cumbersome, so... godspeed.


πŸ‘€ SEE ALSO πŸ‘€

  • HDF5
  • h5py

and that's the whole page, bestie!! written by ESRF, dated January 2023 β€” go forth and do ROI imaging, you absolute icon. mwah. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from