Failure in astrometry after using astrometry.net
Prose v3.3.4
Using an ASTEP+ dataset for TOI-3461.01 on 2024-09-06 (CAMR), Prose3 calibration sequence fails to resolve the astrometry using the block ComputeTransformTwirl leading to a "singular transformation matrix" error for the majority of the dataset. Note that opening the data with DS9 or using the block ComputeTransformXYZ does not lead to any error and the pipeline runs smoothly.
A part of the corresponding dataset can be acquired in private. Please contact me at: [email protected] or directly on GitHub.
Thanks for this issue @vdeloupy! Can you share the telescope file/config with me? After that I will download the dataset and run some tests?
Also, you mentioned the use of astrometry.net in the title. At what step is it involved?
astrometry.net is used independently to do plate solving before using Prose. We noticed some issues in the data headers which are taken care by it (mainly distorsions). So the code runs:
- astrometry.net
- calibration w Prose
- photometry w Prose
Here is the config file of the telescope: astep400+.telescope.txt
Sorry for replying so late on that. It seems that the telescope file you sent is not compatible with the latest version of prose. For example keyword_radec, keyword_observation_time, keyword_field_info are not present in the Telescope definition.
Did you do modifications on your local clone?
I guess it would make sense given that I see that your RA-DEC are stored in the header as SCIDCRD = '192.997667--71.601222'. The problem is that I don't have access to your code and more importantly it'll be harder to understand if the issue comes from prose itself or your modifications.
To treat images with custom headers I recommend creating a custom function like the FITSImage one defined here:
https://github.com/lgrcia/prose/blob/020b6d4d57063a0757a4a944b930adf57c8cf148/prose/core/image.py#L677
This way you can control how the header info is loaded into an Image object without having to fight with the telescope file definition (or add unsupported keywords). I reckon there is no tutorial on that, but no one really asked :).
Indeed you're right, my bad! I added a definition of the "astep400+" telescope in the built-in module on my local clone. I'll share with you as a file the part of the procedure that is not working on my side (with the modifications done before calling prose) by email (as GitHub does not support .ipynb files).
You will eventually see that the error occurs during the photometry sequence (and not the calibration!). With the error raised "singular transformation matrix" by ComputeTransforTwirl.
Thanks for the tip concerning the FITSImage-like custom function, I will consider using that!
astep = dict( altitude= 3233, bjd_scale= 'utc', camera_name= 'Andor ikon-L', dec_unit= 'deg', diameter= 40, gain= 1, hdu= 0, jd_scale= 'utc', keyword_airmass= "AIRMASS", keyword_bias_images= 'bias', keyword_bjd= 'BJD', keyword_dark_images= 'dark', keyword_dec= 'DEC', keyword_exposure_time= 'EXPTIME', keyword_filter= 'CAMFILT', keyword_flat_images= 'flat', keyword_flip= 'PIERSIDE', keyword_fwhm= 'FWHM', keyword_image_type= 'FILENAME', keyword_jd= 'JD', keyword_light_images= 'science', keyword_object= 'OBJECT', keyword_observation_date= 'DATE-OBS', keyword_ra= 'RA', keyword_seeing= 'SEEING', keyword_start_date= 'BEGINOBS', keyword_telescope= 'INSTRUME', latlong= (-75.10028, -123.32417), mjd= 0, name= 'ASTEP400+', names= 'ASTEP400+', pixel_scale= 0.92819166094286, ra_unit= 'deg', read_noise= 9, saturation= 55000, trimming= (30, 30) )