Closed ciskakemper closed 2 years ago
I have added a method to the data classes in 488e01289314692c9cb410ca597a34bf46d6bc44 which I hope will be sufficient for this.
The method masks the data in each Data object internally based on wavelength, with the user specifying any of the limits of the interval and how to treat the edges of the interval. It defaults to including the edges in the data to be used. Simply call phot.selectWaves(low = value, up = value, interval = "kind-of-interval")
(if your data object is phot
; all arguments are optional) and the object will update its internal mask for the new values. For a list of data, call:
for data in dataset: data.selectWaves(inputs)
to get the same behaviour. This should work any time after reading the data from file and before running the fit. If this works we can close the issue.
I've been looking into fixing this. Masked arrays present two issues:
As a result, it looks like the best approach is still a very hacky solution, but it should work. Basically, the original data will have to be copied to duplicate variables, and only the data not masked out will be in the variables used to do calculations. the unmask() method will then simply delete the masks and return the original data to prominence.
I think this is fixed, so closing for now. Please reopen if problems appear.
Following the description by Srinivasan et al. (2017), I want to fit the IRS spectrum only over the observed 8-35 micron range complemented with any photometry available at longer wavelengths (PACS or MIPS-70). This means that in pgQuasarSample.py I need to select a subset of the data in 'irs" and a subset of the data in 'phot' for the fitting. Perhaps this can be done as an additional argument to EmCeeSearch.