Jump to content

Problem with WBPP and the coordinates in the fits header


ERNESTO GUIDO

Recommended Posts

Hi everyone, 

This post is to document a known and easily fixable issue. On some frames in the archive the coordinates in the FITS header end in 60 and Pixinsight expects it to be <60 (for example 11:11:60 instead of 11:12:00). When this is the case, seems like WBPP in PI is unable to correctly read the fits. 

 
I see that for some things PI is really lacking in flexibility. While it is true that, for example, the format RA 11:12:00.00 is preferable to RA is: 11:11:60.00, many astronomy softwares and websites can handle the second format without problems. 


Anyway, thanks to this free software below, it will be possible to edit all the headers at once in a very easy and fast way:

https://www.theastrogazer.com/home/fits-header-tool

Clear Skies,

Ernesto

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

I just checked and this tool is for Windows only. Does anyone know of a tool than runs on Macs?

A point to note: 11:11:60.00 is an illegal value in the definition for fits headers and should never have been used by TL. 11:12:00.00 is the only correct implementation in this example/

Link to comment
Share on other sites

Looks like there is a script to edit fits header directly on PI

I understand that a value 0 <= value < 60 would be better and formally correct. But looks like PI is the only one unable to read a "60" value in the header. Attached an image of an online sky Atlas (NOT related to Telescope Live), where if you search the seagull center coordinates you have our same format Dec -10:26:60.00.

I have attached also another image from a very basic "AR DEC conversion html website" where if you input Dec -10:26:60.00 the website correctly intepret it as -10:27:00.00 (that is of course the preferred format) without any error.

Again, if you insert the RA 7:04:25.01 Dec -10:26:60.00 in the The STScI Digitized Sky Survey online form, you will receive without problems the image of the seagull center.

 

image.png?expires=1701767555&signature=7bfec0aa133a9b00ae1d84e35a97d3067081919730e40b64a90a0c35cdcd68e7

 

image.png?expires=1701767555&signature=a7be17ba1f1703c821766290e284edf5c8aae92656ad95b6b0b43f48cc2be05c

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Just to make sure I understand, you're talking about editing data parameters in the FITS Header, correct as shown below...?  I use an iMac and I use the steps below to edit the FITS Header in the rare case that I need to do this:

1. Open a FITS file.
2. Open the FITS Header selection under "File".
3. Double click row for the FITS value to be changed.
4. Make the changes at the bottom of the FITS viewer/editor window.
5. Click Replace. 
6. Click Apply (blue square box).
7. Save and close the file.
 

Screenshot2023-12-14at10_49_10.thumb.png.bd216b67eba4f380ad08e58566ed83a9.png

Link to comment
Share on other sites

23 hours ago, Reggie Jones said:

Just to make sure I understand, you're talking about editing data parameters in the FITS Header, correct as shown below...?  I use an iMac and I use the steps below to edit the FITS Header in the rare case that I need to do this:

1. Open a FITS file.
2. Open the FITS Header selection under "File".
3. Double click row for the FITS value to be changed.
4. Make the changes at the bottom of the FITS viewer/editor window.
5. Click Replace. 
6. Click Apply (blue square box).
7. Save and close the file.
 

 

that works but if you have to do this to 50 files, it quickly becomes intractable. i don't think you can use ImageContainer to apply this but even if you did, you'd be overwriting all the other fits keywords with the single set of keywords from your fixed file.

i think Mike's BatchFitsKeywordEdit.js script is probably the way to go here.

On 12/5/2023 at 12:48 AM, ERNESTO GUIDO said:

I understand that a value 0 <= value < 60 would be better and formally correct. But looks like PI is the only one unable to read a "60" value in the header.

Juan has repeatedly said that he won't change code in PI to fix other people's bugs. it's not a question of flexibility but correctness. he's a stickler for correctness. if you've ever read the source code to ACP you can see what it looks like when a developer is forced to do this for his variety of paying customers.

Link to comment
Share on other sites

On 12/14/2023 at 7:52 PM, Reggie Jones said:

Just to make sure I understand, you're talking about editing data parameters in the FITS Header, correct as shown below...?  I use an iMac and I use the steps below to edit the FITS Header in the rare case that I need to do this:

With an editor like the one at the link below or with a python script you can change hundreds of fits in a few seconds:

https://www.theastrogazer.com/home/fits-header-tool

 

3 hours ago, rob pfile said:

Juan has repeatedly said that he won't change code in PI to fix other people's bugs. it's not a question of flexibility but correctness. he's a stickler for correctness. if you've ever read the source code to ACP you can see what it looks like when a developer is forced to do this for his variety of paying customers.

 

This glitch afflicts only a very very small fraction of our fits and of course it would have been better if there was no issue at all with coordinates and we are sorry for this. I never asked PI to change their software. So much so that I suggested using a fits editor and fix it with a few clicks.  But the fact remains that PI, that of course is an exceptional software, is the only software/website that I have recently tried that cannot figure out that 60 in the coordinates stands for 00. This is a fact. (only today I tried to insert it in SIMBAD and the website return no error, just transfom it in 00 and give the result you were looking for). IMHO is not a good solution, in the name of correctness, to leave an user with a stuck software without explaining him what the problem is. 

Another simple solution, just turn OFF the astrometric solutions via Preferences if you have problems to load the frames in WBPP.

 

Clear Skies,

Ernesto

Link to comment
Share on other sites

If it helps anyone, I have added a radecfix option to my Python FitsPy.py utility. It reads coordinates that are assumed to have names OBJCTRA and OBJCTDEC, and it assumes the format is like ''33 54 60.00'. It converts values to decimal and back to original format. So the example value is converted to 33 55 00.00.

I have not yet hit this problem myself so I have done very limited testing.

You can find it here: https://ruuth.xyz/FitsPyInfo.html

Jarmo

  • Like 3
Link to comment
Share on other sites

5 minutes ago, Jarmo Ruuth said:

If it helps anyone, I have added a radecfix option to my Python FitsPy.py utility. It reads coordinates that are assumed to have names OBJCTRA and OBJCTDEC, and it assumes the format is like ''33 54 60.00'. It converts values to decimal and back to original format. So the example value is converted to 33 55 00.00.

 

Thanks Jarmo, greatly appreciated!

 

Clear Skies,

Ernesto

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site you agree to our Guidelines