These are more of philosophical questions than coding questions.
I've got a SEM / STEM X-ray spectrum imaging EDS package up and running *very* well in Python, incorporating both the state-of-the-art published algorithms and one or two of my own.
My first question is, how best to integrate into Pycroscopy? At the moment I have a single file to import, with a base class that is inherited by vendor-specific classes. You instantiate an instance of the vendor-specific class handle the import, and their inheritance from the base class handles the actual spectrum image analysis.
And there's the rub -- because EDS is so noisy, methods like K-means or SVD fail and require physics-informed derivatives.
At present I've loaded those in as methods on the base class, so that you could invoke, for instance, `U, S, V = my_eds_object.scaled_svd()`.
Because these are physics-based, I'm tempted to leave them hanging off the class that also handles imports, but should they move to `pycroscopy.processing`? I would hate to break up the EDS specific stuff across multiple pre-existing modules, because that would, I expect, make maintenance and enhancement difficult, but I could also see that having processing and I/O lumped together away from `processing` and `io` could cause different problems.
#########
My second question is, how to handle multiple streams of analysis in the USID file? I've got this, which is easy enough using pyUSID.NumpyTranslator:
```
/
├ Measurement_000
---------------
├ Channel_000
-----------
├ Position_Indices
├ Position_Values
├ Raw_Data
├ Spectroscopic_Indices
├ Spectroscopic_Values
```
However, I'd like to be able to stash multiple sets of analyses. Let's say I bin pixels 8x8 and the spectral channels x2 and perform SVD (analysis 000), then try again with 4x4, x4 binning and try SVD (analysis 001). How would I handle this? My thought of the most logical approach is `/Measurement_000/Chanel_000/Analysis_000` with `/Binned_Data_SparseCSC`, `/S`, `/U`, `/V`, etc. inside of the group `/Analysis_000` but I don't want to break the pyUSID or Pycroscopy API by getting clever. Advice?
Thanks
Chad