drizzlepac icon indicating copy to clipboard operation
drizzlepac copied to clipboard

tweakreg.TweakReg : catalog_fit.match Column 15: Input EXTVER ID not correct

Open kyika opened this issue 5 years ago • 9 comments

Hi,

When I run the tweakreg.TweakReg on HST WFC3 images (ib6w71kxq_flc.fits,ib6w71kzq_flc.fits, etc) to try to match the stars on them and to align the images with each other, I find that the output of catalog_fit.match (a catalog of the positions of sources used to calculate the transformation) is somewhat weird, specifically, the column 14 and the column 15 are identical for all the row in the files (According to the description at the header of the file, the column 14 should be the Input ID (one ID for each position found at previous step), the column 15 should be the Input EXTVER ID (the extension ID for a multi-extension fits file) ).

Would you like to check it and give me some hint of how can I get the extension ID of the position listed in the catalog_fit.match, I really need it as I what to plot the positions on the images (follow the step of align_multiple_visits on https://github.com/spacetelescope/notebooks/tree/master/notebooks/DrizzlePac), I would be very grateful.

p.s. a snapshot of the example file generated by tweakreg in the attachment.

image

kyika avatar May 21 '19 14:05 kyika

This does look like a bug. It seems to originate from this change: https://github.com/spacetelescope/drizzlepac/commit/9cd039f3834edbbb01b7ac9ba6c7ccbc266ce138#diff-62a80b7810f430706a201f2fce2070fdR680

CC: @stsci-hack

mcara avatar May 22 '19 16:05 mcara

@kyika Thank you for noticing this and reporting it!

mcara avatar May 22 '19 16:05 mcara

EDIT: Ignore comment below:

@kyika As a temporary workaround, I would suggest that you extract extension number from the file name (last column). Assuming f is a string containing the file name from the last column, you can do the following:

ext_number = int(f[f.index('[') + 1: f.index(']')])

mcara avatar May 22 '19 17:05 mcara

Please disregard my previous comment: last column is something else...

mcara avatar May 22 '19 17:05 mcara

I tested this with the 2 datasets listed and the jupyter notebook linked. Using the software versions below, I find that the fit.match file looks fine and the sources overplot nicely onto the two chips, as shown in the notebook.

The user doesn't mention what version of software they are using... Perhaps the bug is more recent than 2018?

TweakReg Version 1.4.7(18-April-2018) started at: 18:19:15.740 (22/05/2019) Python Version [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:30:03) numpy Version -> 1.15.2 astropy Version -> 3.0.4 stwcs Version -> 1.4.2

mackjenn avatar May 22 '19 22:05 mackjenn

@mackjenn Thank you very much!

@kyika Could you please specify software version that you are using?

mcara avatar May 22 '19 22:05 mcara

@mcara @mackjenn Thank you very much!

Below is some version information:

Mac OS 10.13.6 conda 4.6.12 Installed the full Astroconda package from https://astroconda.readthedocs.io/en/latest/ Drizzlepac 2.2.6 TweakReg Version 1.4.7(18-April-2018) started at: 09:39:04.444 (21/05/2019) Python Version [Clang 4.0.1 (tags/RELEASE_401/final)] 3.7.3 (default, Mar 27 2019, 16:54:48) numpy Version -> 1.16.2 astropy Version -> 3.1.2 stwcs Version -> 1.4.2

kyika avatar May 23 '19 04:05 kyika

@stsci-hack I can confirm/reproduce the issue.

mcara avatar May 23 '19 17:05 mcara

@mcara Unfortunately, I have been unable to reproduce the problem. I will need to work with you to understand how this error appears.

stsci-hack avatar Jun 14 '19 18:06 stsci-hack