Open ianjarog opened 1 year ago
This is the bit where, since the user mask cube is not on the same channel grid as the new image cube being made, some channel selection and/or binning needs to happen before the mask can be used for cleaning.
I'm not sure why crvale
is not defined when the spectral axis is in frequency. @healytwin1 @Fil8 any idea?
Sorry I didn't see this earlier. Not sure why crvale
wouldn't be defined. Out of interest, what does the header file that is triggering the error look like?
@ianjarog is this still a problem?
@ianjarog is this still a problem?
@healytwin1 This happened to the latest branch at the time of testing and I switched to another branch to bypass it. I need to test again to confirm. I think the code itself is very clear that there is no crvale defined if 'FREQ' in hdul[0].header['CTYPE3']
@healytwin1 crvale=firstchanfreq[0]+chanwidth[0]firstchan+nchansbinchans*chanwidth[0] should be added to the line in if 'FREQ' in hdul[0].header['CTYPE3']: I also noticed that this condition (np.max([crval, crvale]) <= np.max([ax3[0], ax3[-1]])) & (np.min([crval, crvale]) >= np.min([ax3[0], ax3[-1]])) was not satisfied in case where it should be satisfied (in case of a very small difference in frequency).
Looks like in this line in line_worker.py crvale is not defined if 'FREQ' in hdul[0].header['CTYPE3']