Closed els1 closed 2 years ago
I took a look at this, and it turns out Gaussian1D already has a bounding box set as a method, which specifies 5.5sigma bounds (see below). Drude1D also has such a method defined, but it is set at 50*fwhm
, both left and right, which is probably unnecessarily large. So we could think about trimming those down a bit. But the big savings from lines are apparently already baked in.
def bounding_box(self, factor=50):
"""Tuple defining the default ``bounding_box`` limits,
``(x_low, x_high)``.
Parameters
----------
factor : float
The multiple of FWHM used to define the limits.
"""
x0 = self.x_0
dx = factor * self.fwhm
return (x0 - dx, x0 + dx)
Bummer.
Closing as this is already implemented.
Enhance speed of fitting (cubes): look into Astropy modeling as it includes bounding boxes (https://docs.astropy.org/en/stable/modeling/models.html#bounding-boxes).