PyWiFeS / pipeline

The Python data reduction pipeline for WiFeS
6 stars 26 forks source link

Data cube with astrometry #40

Closed CMartinezLombilla closed 6 months ago

CMartinezLombilla commented 6 months ago

We have implemented the astrometry in the data cubes. We can now identify the sources and the field of view in the sky region. However, some offsets are still present in both RA and DEC coordinates. The main reasons for these offsets are explained below. We plan to investigate how to improve the accuracy of the astrometry in a further PR.

We are using the RA and DEC values in the header of the '.fits' files. These coordinates are those of the science target and were provided by the observer. Also, these RA and DEC values should correspond to the centre of the IFU, and therefore in the centre of the image from the reduced cube. However, we see clear offsets from those positions. The reason for that is that the telescope pointing is calibrated using the acquisition star that was found and centred in the guide camera (not the IFU). Thus, the actual RA and DEC coordinates are defined by the relative difference between these positions. However, applying those differences in the positions implies many small calibrated transformations that can contribute to errors. In addition, the accuracy of the coordinates supplied by the users can potentially increase the uncertainties of the astrometry, especially for high proper motion acquisition stars.

To implement the astrometry we have made changes in the src/pywifes/pywifes.py file in the generate_wifes_3dcube function. We have used the information in the headers of the files and some calculations, and then we saved the information in new keywords in the header of the data cubes files.

We also updated the information in the README.md file to account for the astrometry. The differences regarding the multithreading are due to the differences in the commits history.