usnistgov / mass

Microcalorimeter pulse-analysis software
MIT License
6 stars 0 forks source link

MASS should be able to assume white noise when no noise files are given #223

Closed joefowler closed 2 years ago

joefowler commented 2 years ago

Original report by Joseph Fowler (Bitbucket: joe_fowler, ).


Right now, you can open a mass.TESGroup with a set of LJH pulse files but no noise files. If you do that, then lots of features work correctly, but several usual pulse analysis features will raise errors, including:

Often, that’s what we want to happen. But there should be a way for the user to signal “I have no noise data, but I don’t mind proceeding with an analysis that assumes the noise is white.” Proposal:

  1. A method MicrocalDataSet.assume_white_nose(noise_rms=1.0) (with an @_add_group_looper decoration). When called, they set the MicrocalDataSet.noise_autocorr[:] to the value [noise_rms,0,0,...]. This allows compute_filters and compute_ats_filters and compute_5lag_filters to work correctly.
  2. compute_noise_spectra() should still raise an error, because of course computing noise is impossible.
  3. Why not add TESGroup.compute_noise() as an alias for compute_noise_spectra, which is not accurately named (b/c it computes spectra and autocorrelation). But keep the latter, for reverse compatibility. Ooh! We could add a deprecation warning to compute_noise_spectra.
  4. Add appropriate tests.

@{61ef26a2138863006a92f113} got me thinking about this feature.

joefowler commented 2 years ago

Original comment by Joseph Fowler (Bitbucket: joe_fowler, ).


Add MicrocalDataset.assume_white_noise()

Allows users to make optimal filters even when no noise files are available, by assuming white noise. Fixes #223.