Batch extract fits header into a csv file

Request a new feature
jst200
Posts: 27
Joined: 20 Mar 2018, 12:43

Batch extract fits header into a csv file

Post by jst200 » 13 Oct 2019, 15:28

Hi Han,

Would it be worth and, more importantly, would you be prepared to add an option to your Tools set to batch extract the fits header of selected files into a csv file? Each column would be a FITS Header definition.

The csv would help do various analysis tasks using Excel.

Cheers, Jim

han.k
Posts: 288
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Batch extract fits header into a csv file

Post by han.k » 14 Oct 2019, 22:30

Hello Jim,

Have you already tried to copy the analysed list. In the stack menu, you can copy all data and paste into Excel. See popup menu. Select all and Copy selected list to clipboard.

If something is missing, I would prefer to add it to the list rather then .csv files.

Han

jst200
Posts: 27
Joined: 20 Mar 2018, 12:43

Re: Batch extract fits header into a csv file

Post by jst200 » 15 Oct 2019, 20:33

Hi Han,

Thanks, I hadn't realised you could do that. :) A Select All, Copy and Paste into Excel works perfectly.

Could you add the ambient temp (TAMBIENT) to the list?

Actually, what I was looking to do was sum the ambient temp for a night's session and relate that to the focuser position. I have asked Ivo to put FOCUSPOS into the Fits Header, which has agreed to do. TAMBIENT is already there. Then I'll create a spreadsheet of ambient temp vs focuser position to see if I can see any correlation.

I don't know if this is worth it or not, but the other obvious fits header fields that are missing from the list are gain and focal length. I can't think of use for them yet, but it seems it would make the listed properties reasonably complete. :geek:

What do you think :?:

Thanks, Jim

han.k
Posts: 288
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Batch extract fits header into a csv file

Post by han.k » 15 Oct 2019, 21:14

Hello Jim,

I have already focus temperature (foctemp) which is for me ambient temperature. I could add at the same place ambient temperature if available. What keyword is used for ambient temperature?

According the MaximDl list there are already three keywords for it:

https://diffractionlimited.com/help/max ... itions.htm

After this I don' t want too add much more. it is already a long list.

Han

han.k
Posts: 288
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Batch extract fits header into a csv file

Post by han.k » 15 Oct 2019, 22:36

I had a look around. See below. FOCUSTEM, FOCTEMP are already included

Han

CCDCiel:
FOCUSTEM

MaximDl:
FOCUSTEM – Focuser temperature readout in degrees C, if available.


professional FITS
FOCTEMP = 8.0770000 / [deg C] Focus temperature
TUBETEMP= 8.0710000 / [deg C] Temperature of the telescope tube
WMSTEMP = 10.4000000 / [deg C] External temperature
REFTEMP = 10.4000000 / [deg C] Temperature used in refraction calculat


TheSky
AMB-TEMP= 5.9 / Ambient temperature (in degrees C)
TEMPERAT= 5.9 / Ambient Temperature in degrees C
FOCTEMP = 7.58 / Focuser temperature

Voyager:
FOCUSTEM= 21.

SGP
FOCTEMP = 5.00733333333333 / Focuser temperature
AMB-TEMP= 9 / Ambient temperature (in degrees C)
TEMPERAT= 9 / Ambient Temperature in degrees C

SBIG document:
none


APT:
TAMBIENT

jst200
Posts: 27
Joined: 20 Mar 2018, 12:43

Re: Batch extract fits header into a csv file

Post by jst200 » 15 Oct 2019, 23:16

Hi Han,

I saw Focus Temp (foctemp) in the list, but assumed this was the temperature of the focusing device and not necessarily the ambient temp of the surrounding air. I also assumed that the scope, and specifically the focus tube, would be similar, if not equivalent to the ambient temp.

Anyway, I was thinking of the value TAMBIENT, as you display at the bottom of the ASTAP fits header panel, e.g.:
Capture.JPG
Capture.JPG (60.46 KiB) Viewed 1800 times
From your list it looks like a case of "flexible" standards :?: :o So where Ivo (APT) is using TAMBIENT, others use FOCUSTEM, FOCTEMP, TEMPERAT, etc. :?: Personally, I think the ambient (or air) temp is best described by TAMBIENT.

In my configuration at least, APT gets TAMBIENT, from the temp probe on my Pegasus Focus Cube. Which is reasonable, as the probe is just resting in free air.

Oh, t's all very confusing! :?

Thanks, Jim :)

han.k
Posts: 288
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Batch extract fits header into a csv file

Post by han.k » 16 Oct 2019, 11:37

Hello Jim,

There is unfortunately a lack of standardisation. I think a lot of programmers look to Sbig, TheSky and MaximDL for guidance. Rather then adding the new TAMBIENT i prefer to talk with Ivo if he could adapt to existing keywords independent if they are aproppiate. So either FOCUSTEM, FOCTEMP or maybe AMB-TEMP from theSky.

I will add TAMBIENT temporary for the time being, but drop a message to Ivo with a request to adapt to the existing keywords.

Later, i posted a message at the APT forum:
https://aptforum.com/phpbb/viewtopic.php?f=17&t=2887

I also noticed AMB-TEMP is also used by SGP, so I updated the previous list.

Clear skies, Han.

jst200
Posts: 27
Joined: 20 Mar 2018, 12:43

Re: Batch extract fits header into a csv file

Post by jst200 » 16 Oct 2019, 14:08

Hi Han,

Sorry! I seem to be causing a lot of trouble :oops:

I've seen your post to Ivo and it looks like he will change to one of the values you suggested. :)

Please don't change your program on a temporary basis on my account. I'm in no rush. So happy to wait until APT changes.

Thanks again for your efforts. :D

Cheets, Jim

han.k
Posts: 288
Joined: 23 Nov 2017, 15:04
Location: The Netherlands
Contact:

Re: Batch extract fits header into a csv file

Post by han.k » 16 Oct 2019, 15:08

Jim,

No problem to change. It is a good opportunity to test the whole process. I just uploaded version 0.9.277. It will use TAMBIENT and AMB-TEMP and add these values to FocTemp. Test if this works for you.

I also added gain. I don't like changing the gain but it will report the gain just in case.

Clear skies, Han

Post Reply