bug-gnuastro
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using astscript-psf-select-stars on HST flc images


From: Alejandro Serrano Borlaff
Subject: Re: Using astscript-psf-select-stars on HST flc images
Date: Wed, 11 Jan 2023 12:47:46 -0800

Follow up with more info on the previous issue:

I realized that astnoisechisel also has problems with HST's distorted WCS. When running astnoisechisel on one of the flc.fits images that can be downloaded with the script, the output _detected.fits image contains no WCS information. The error is reproducible by simply running:

(astro) aborlaff@chispas PSF % astnoisechisel jety03gxq_flc.fits -h1    
astnoisechisel: gal_wcs_read_fitsptr: (warning) wcsfix status for cdfix: -1
astnoisechisel: gal_wcs_read_fitsptr: (warning) wcsfix status for obsfix: -1
astnoisechisel: gal_wcs_read_fitsptr: (warning) wcsfix status for unitfix: -1
astnoisechisel: gal_wcs_read_fitsptr: (warning) wcsfix status for spcfix: -1
astnoisechisel: gal_wcs_read_fitsptr: (warning) wcsfix status for celfix: 5
astnoisechisel: gal_wcs_read_fitsptr: (warning) wcsfix status for cylfix: -1
astnoisechisel: gal_wcs_read_fitsptr: WCSLIB warning: wcsset error 5: Invalid parameter value
NoiseChisel 0.19 started on Wed Jan 11 12:45:43 2023
  - Using 10 CPU threads.
  - Input: jety03gxq_flc.fits (hdu: 1)
  - Kernel: FWHM=2 pixel Gaussian.
  - Convolved with given kernel.                       0.808605 seconds
  - Starting to find initial detections.
  ---- 0.30 & 0.99 quantile thresholds applied.        0.210473 seconds
  ---- Eroded 2 times (4-connected).                   0.055251 seconds
  ---- Opened (depth: 1, 8-connected).                 0.043901 seconds
  - 24371 initial detections found.                    0.429750 seconds
  - Starting to find/remove false detections.
  ---- Initial (crude) Sky and its STD found.          0.134769 seconds
  ---- Pseudo-detection thresh (0.000 sigma) applied.  0.009964 seconds
  ---- Pseudo-det S/N: 4.815 (0.99 quant of 16177).    0.320284 seconds
  ---- 18396 false initial detections removed.         0.107706 seconds
  ---- Growth to 0.900 quantile complete.              1.002000 seconds
  - Detection complete.                                1.764656 seconds
  - Output written to 'jety03gxq_flc_detected.fits'.
NoiseChisel finished in:  3.740632 seconds

Noisechisel successfully runs, so astsegment, but since the output contains no WCS, astmkcatalog won't be able to find the --ra and --dec.


(astro) aborlaff@chispas PSF % astsegment jety03gxq_flc_detected.fits -h1
Segment 0.19 started on Wed Jan 11 12:45:52 2023
  - Using 10 CPU threads.
  - Input: jety03gxq_flc_detected.fits (hdu: 1)
  - Sky STD: jety03gxq_flc_detected.fits (hdu: SKY_STD)
  - Kernel: FWHM=1.5 pixel Gaussian.
  - Detection: jety03gxq_flc_detected.fits (hdu: DETECTIONS)
  - Convolved with given kernel.                       0.730032 seconds
  - Input number of connected components: 4852
  - Finding true clumps...
  ---- Clump peak S/N: 4.74692 (0.950 quant of 43579). 0.182145 seconds
  - 7609 objects containing 7482 clumps found.         1.400470 seconds
  - Output written to 'jety03gxq_flc_detected_segmented.fits'.
Segment finished in:  2.057429 seconds
(astro) aborlaff@chispas PSF % astmkcatalog --ra --dec --magnitude jety03gxq_flc_detected_segmented.fits
astmkcatalog: jety03gxq_flc_detected_segmented.fits (hdu: OBJECTS): no WCS meta-data found by WCSLIB. Atleast one of the requested columns requires world coordinate system meta-data

Best,
Alex

El mié, 11 ene 2023 a las 10:34, Alejandro Serrano Borlaff (<asborlaff@gmail.com>) escribió:
Hi!

I am writing again with a new difficulty that I found when using gnuastro on my files. I am trying to run the subtracting the PSF tutorial on some HST images. When I run the astscript-psf-select-stars script on any of my individual HST frames, the following error appears. I attached a minimal reproducible jupyter-notebook that downloads and executes the code to this email for reference:

astquery: gal_wcs_read_fitsptr: (warning) wcsfix status for cdfix: -1
astquery: gal_wcs_read_fitsptr: (warning) wcsfix status for obsfix: -1
astquery: gal_wcs_read_fitsptr: (warning) wcsfix status for unitfix: -1
astquery: gal_wcs_read_fitsptr: (warning) wcsfix status for spcfix: -1
astquery: gal_wcs_read_fitsptr: (warning) wcsfix status for celfix: 5
astquery: gal_wcs_read_fitsptr: (warning) wcsfix status for cylfix: -1
astquery: gal_wcs_read_fitsptr: WCSLIB warning: wcsset error 5: Invalid parameter value
astquery: ./mastDownload/HST/j9en0pnaq/j9en0pnaq_flc.fits (hdu 1): contains no WCS to derive the sky coverage

I am using Gnuastro 0.19 on a MacOS 12.6.2. I am guessing that WCSlib can't deal correctly with the distorted frames of HST, and that the PSF subtraction should be run in the final mosaics, or at least the undistorted frames. That would be less than ideal, since the PSF is better defined in the original frames before drizzling. But before going to the workaround, do you think that there is a solution to this error?


Thank you!


--
==================================================================
Ex Luna, Scientia

Alejandro S. Borlaff, PhD  -  NASA / BAERI Researcher
NASA Space Science and Astrobiology Division (Code ST)
NASA Ames Research Center, N245-6, Moffett Field, California (94035) USA              
Webpage :  https://borlaff.github.io/
GitHub: https://github.com/Borlaff
Twitter: @asborlaff
==================================================================


--
==================================================================
Ex Luna, Scientia

Alejandro S. Borlaff, PhD  -  NASA / BAERI Researcher
NASA Space Science and Astrobiology Division (Code ST)
NASA Ames Research Center, N245-6, Moffett Field, California (94035) USA              
Webpage :  https://borlaff.github.io/
GitHub: https://github.com/Borlaff
Twitter: @asborlaff
==================================================================

reply via email to

[Prev in Thread] Current Thread [Next in Thread]