Author Topic: FITSKeywords.js - assignment error  (Read 324 times)

Offline FlyingBeagles

  • Newcomer
  • Posts: 19
    • View Profile
FITSKeywords.js - assignment error
« on: 2018 July 17 20:25:46 »
Hi Team,

Now, this may or may not be a bug as I am not the worlds greatest Javascript user.   However, for the purposes of reporting, I provide the following:
I am looking to change the focal length of a series of images taken when I first started using SGP.  Unfortunately, I did not know enough about the product at the time to realise I needed to set the correct focal length of my train so in stead of 714mm (ES ED102CF), I somehow got 571 for all my images.  It was quite a while ago so not sure what I did back then.

In any event, I read the forums regarding batch processing changes to FITSKeywords and it eventually led me to the FITSKeywords script (I started manually changing FOCALLEN but that is going to get painful with the amount of images I have).

Besides not knowing how to actually batch change using FITSKeywords, I can load images, set an output directory and check the box that brings up FOCALLEN but cannot for the lift of me figure how to change the parameter from 571 to the correct 714mm.  I noted in Process Console the following error and wondered if that might have something to do with it:

run --execute-mode=auto "/Applications/PixInsight/src/scripts/FITSKeywords.js"

Processing script file: /Applications/PixInsight/src/scripts/FITSKeywords.js
 
** Warning [156]: /Applications/PixInsight/src/scripts/FITSKeywords.js, line 574: assignment to undeclared variable I

For information (and any suggestions),

I should add, I am running Mac OS 10.13.6 (High Sierra) on a late 2012 iMac 27"

Pete
SCOPE - ES ED102CF APO triplet
MOUNT - Hypertuned AZ EQ6-GT
GUIDESCOPE - Orion MMAG
IMAGING TRAIN - Atik 383L+ Mono > EFW2 (loaded with Astrodon 36mm 5nm Ha OIII and SII + LRGB) > Stellarvue 102 FF/FR > Moonlite w/autofocus
IMAGING SOFTWARE - Sequence Generator Pro
PROCESSING - PixInSight!

Online pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4309
    • View Profile
Re: FITSKeywords.js - assignment error
« Reply #1 on: 2018 July 17 22:38:17 »
i had never looked at this script before - i managed to run it, but it seems what it did was to create a directory with the focal length value in the fits header of the file i chose and copy the file into that folder. it seems like its purpose is to sort your files by keyword rather than modify keywords.

i am also using OSX so i'm not sure why it did not run for you. do you have a pointer to the thread that describes using this script to batch-change fits header values?

rob

Offline FlyingBeagles

  • Newcomer
  • Posts: 19
    • View Profile
Re: FITSKeywords.js - assignment error
« Reply #2 on: 2018 July 18 00:13:17 »
Hi Rob,

Nice to hear from you again.

This is the thread from where I think this script grew:

https://pixinsight.com/forum/index.php?topic=9721.0

I admit this the fitsheader script grew out of this is an assumption on my part.

Pete
SCOPE - ES ED102CF APO triplet
MOUNT - Hypertuned AZ EQ6-GT
GUIDESCOPE - Orion MMAG
IMAGING TRAIN - Atik 383L+ Mono > EFW2 (loaded with Astrodon 36mm 5nm Ha OIII and SII + LRGB) > Stellarvue 102 FF/FR > Moonlite w/autofocus
IMAGING SOFTWARE - Sequence Generator Pro
PROCESSING - PixInSight!

Online pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4309
    • View Profile
Re: FITSKeywords.js - assignment error
« Reply #3 on: 2018 July 18 10:07:44 »
OK that makes sense - the script that's part of the PI distro is not the script in that thread.

the script that Alejandro refers to is something that he made by augmenting the script that juan posted in the thread. if you go to:

http://pixinsight.com.ar/repository/

you will see a bunch of zip files. the one you want is BatchEditFITSSingleKeyword.zip. you can then unzip that and execute it from the PI console or from the "Execute Script File..." menu option under the Scripts menu. or, you can follow Alejandro's instructions to add his repository to your PI and download and install the script thru PI's interface. whichever is easier for you...

rob



Offline FlyingBeagles

  • Newcomer
  • Posts: 19
    • View Profile
Re: FITSKeywords.js - assignment error
« Reply #4 on: 2018 July 18 17:21:33 »
Thanks mate, appreciate it after following the repository update instructions, and no updates provided, I wrongly assurmed that was it.

Thanks again Rob,

Pete
SCOPE - ES ED102CF APO triplet
MOUNT - Hypertuned AZ EQ6-GT
GUIDESCOPE - Orion MMAG
IMAGING TRAIN - Atik 383L+ Mono > EFW2 (loaded with Astrodon 36mm 5nm Ha OIII and SII + LRGB) > Stellarvue 102 FF/FR > Moonlite w/autofocus
IMAGING SOFTWARE - Sequence Generator Pro
PROCESSING - PixInSight!