kmhess / SoFiA-image-pipeline

Generate figures of spectral line sources, for publication or quick inspection, based on SoFiA-2 output catalog and fits files.
GNU General Public License v3.0
16 stars 7 forks source link

ERROR: general error attempting return image from SkyView query for DSS2 Blue survey. #67

Closed panstarrs closed 2 years ago

panstarrs commented 2 years ago

Hi, this is a new error for me, but maybe you have seen it before, so please let me know if you can help with it, thanks! The problem is that the SIP won't produce the spacial images including (mom0.png, mom0_dss2blue.png, mom1.png and snr.png). I kind of know why there is no snr.png because I also don't have the snr.fits in the sofia cubelets folder, but no *mom0.png is something that I don't understand.

*****************************************************************
        Beginning SoFiA-image-pipeline (SIP).
        Reading catalog in XML format.
        WARNING: always assumes an xml file comes from SoFiA-2.

        -Source 1: SoFiA J095847.48+022007.7.
        Start making spatial images.
        Found J2000.0 equinox in header.
        Found LSRK reference frame specified in SPECSYS in header.
        Found CTYPE3 spectral axis type FREQ in header.
        No SNR fits file found. Will determine lowest contour based on rms in catalog, min(user provided SNR), and user provided channel width.
WARNING: AstropyDeprecationWarning: The truth value of a Quantity is ambiguous. In the future this will raise a ValueError. [astropy.units.quantity]
        The first HI contour defined at SNR = 2.0 has level = 0.000e+00 Hz (mom0 data units). 
        Image size bigger than default. Now 23.48 arcmin
        No user image given. Proceeding with the download of any requested archive images.
WARNING: InputWarning: Coordinate string is being interpreted as an ICRS coordinate. [astroquery.utils.commons]
        Survey image retrieved from DSS2 Blue.
        Making DSS2 Blue overlaid with HI contours.
        ERROR: general error attempting return image from SkyView query for DSS2 Blue survey. Trying with cache=False.
                Second attempt failed. Try again later?
        Making pv slice.
        Reading in mask cubelet.
|=====================================================================================================================================|  23 / 23  (100.00%)         0s
/users/panh/.local/lib/python3.9/site-packages/astropy/visualization/wcsaxes/core.py:234: UserWarning: No contour levels were found within the data range.
  cset = super().contour(*args, **kwargs)
        Done making spatial images of the spectral line source 1: SoFiA J095847.48+022007.7.
        Start making spectral profiles
        Found J2000.0 equinox in header.
        Found LSRK reference frame specified in SPECSYS in header.
        Found CTYPE3 spectral axis type FREQ in header.
        Making HI SoFiA masked spectrum plot.
        WARNING: Original data cube not provided: making spectrum of subcube with noise.
        Making HI spectrum plot covering the full frequency range.
        Done making spectral profiles of the spectral line source 1: SoFiA J095847.48+022007.7.

        DONE! Made images for 1 sources.
*****************************************************************
kmhess commented 2 years ago

Yeah...the program currently catches ValueErrors which (non-exhaustive list of cases) includes when the survey name submitted by the user isn't recognized, and HTTPErrors which includes a connection error to the server. Every other Exception is going to output this "general error" message, which may include the case where a particular area isn't covered by the requested survey. Can you check to make sure that pointing has been observed with DSS2 Blue another way? (Maybe NED?). I should then try to identify these cases, but I think last time I checked astroquery wasn't giving me useful/specific enough info to differentiate between that and other (as yet unknown) problems...

panstarrs commented 2 years ago

Sure, I'll check that later, but the key thing for me now is to produce HI contour images including all the moments maps. Can we have a way to avoid searching any images from other surveys, so that no error should occur even if my area is not covered by any other surveys ?

kmhess commented 2 years ago

Yes, that's a goal we have (see #20). I think this will be possible (maybe even easy) after we merge the #57 noregrid branch. Should be accomplished within the next couple weeks (sorry--we have lots going on at the moment). Otherwise, if you don't care about the optical images, try -s 2MASS-J or -s HI4PI. They should truly cover the whole sky without trying to avoid the Galactic Plane.

panstarrs commented 2 years ago

okay, thanks and no problem. I don't care about the optical images for now but it would be nice to be have them anyway. I'll take a closer look at my data, to make sure that nothing is wrong with my output from SoFiA-2 since I'm still getting this error even I use -s 2MASS-J or -s HI4PI

panstarrs commented 2 years ago

Okay, I now know what's going on with the error. In my case It looks that SIP works better for the S+C finder rather than the Threshold finder, so the error is gone once I use the S+C finder, thanks.

kmhess commented 2 years ago

Sorry...just coming back to this now. Do you know what changed about the input catalog between the non-working and working version?

panstarrs commented 2 years ago

Hi I only noticed there was no snr.fits in the cubelets folder when running Threshold finder, and this finder doesn't allow for the Reliability check, though I don't know why these differences can cause an error like that for SIP, thanks.