Closed joefowler closed 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.
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:TESGroup.compute_noise_spectra()
TESGroup.compute_filters()
TESGroup.compute_ats_filters()
TESGroup.compute_5lag_filters()
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:
MicrocalDataSet.assume_white_nose(noise_rms=1.0)
(with an@_add_group_looper
decoration). When called, they set theMicrocalDataSet.noise_autocorr[:]
to the value [noise_rms
,0,0,...]. This allowscompute_filters
andcompute_ats_filters
andcompute_5lag_filters
to work correctly.compute_noise_spectra()
should still raise an error, because of course computing noise is impossible.TESGroup.compute_noise()
as an alias forcompute_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 tocompute_noise_spectra
.@{61ef26a2138863006a92f113} got me thinking about this feature.