You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The baseline method has exclusion regions specified in channels. The baseline_model prints out the
solution with the slope in K/Hz rather than K/chan. The downside of the latter is that the y-intercept, c0, is not an obvious number since the spectra run over frequencies in the GHz range.
How to Reproduce
Use the provided frequency switch notebook. You will see that the spectral baseline is around zero K but the
baseline model is:
Model: Polynomial1D
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Degree: 3
Parameters:
c0 c1 ... c3
K K / Hz ... K / Hz3
----------------- ---------------------- ... ----------------------
7.735236225877181 -5.459874717654905e-09 ... -2.024830644563859e-63
It is not that it is incorrect; it just that the user does not have an intuitive check of
the value. It would be easier for the user to understand if the reported fit were in
channel space. Also, all of the coefficients should be printed (c2 is missing in this
case).
Environment
Dysh version
Python version 3.11
The text was updated successfully, but these errors were encountered:
For other reasons (the rounding problem) the code has been fixed as to normalize the freq. axis to 0..nchan-1 so now the polynomial coeffs are more natural if you think in channel space.
Sadly, due to astropy not know what channels are, the units of the coefficients are still displayed as C1/Hz and C2/Hz2 etc., but they really are per channel
In dysh the failure to use chan is here:
self._spectral_axis[i] = i * u.chan
See also astropy/specutils#542 where the claim is that this was solved. Thus our use of the spectrum1D class must be at fault. TBD
Describe the bug
The baseline method has exclusion regions specified in channels. The baseline_model prints out the
solution with the slope in K/Hz rather than K/chan. The downside of the latter is that the y-intercept, c0, is not an obvious number since the spectra run over frequencies in the GHz range.
How to Reproduce
Use the provided frequency switch notebook. You will see that the spectral baseline is around zero K but the
baseline model is:
Model: Polynomial1D
Inputs: ('x',)
Outputs: ('y',)
Model set size: 1
Degree: 3
Parameters:
c0 c1 ... c3
K K / Hz ... K / Hz3
----------------- ---------------------- ... ----------------------
7.735236225877181 -5.459874717654905e-09 ... -2.024830644563859e-63
It is not that it is incorrect; it just that the user does not have an intuitive check of
the value. It would be easier for the user to understand if the reported fit were in
channel space. Also, all of the coefficients should be printed (c2 is missing in this
case).
Environment
The text was updated successfully, but these errors were encountered: