Scripting functions for stacking?

Scripts and programs to automate Astroart
Post Reply
User avatar
Rudi
Posts: 83
Joined: 08 Jan 2019, 04:47

Scripting functions for stacking?

Post by Rudi » 27 Oct 2019, 07:40

I have a set of over 500 fits, that I need to stack in groups of 10's.

stack1 = stack(i1, i2, ...i10)
stack2 = stack(i11, i12, ...i20)
.
.
.

Doing this manually, quickly becomes boring.

Is it possible to automate this in AA7? I san not find any suitable scripting functions.
/Rudi

fabdev
Posts: 219
Joined: 03 Dec 2018, 21:43

Re: Scripting functions for stacking?

Post by fabdev » 27 Oct 2019, 13:02

Hi there's an experimental command called "Preprocessing(text)" which accepts a text which contains the files to be stacked. Here is an example of the format of the text:

Code: Select all

#PREPROCESSING
Dark=D:\temp\Drk01.fit
Dark=D:\temp\Drk02.fit
Image=D:\temp\IC1805-R1.fit
Image=D:\temp\IC1805-R2.fit
Image=D:\temp\IC1805-R3.fit
Image=D:\temp\IC1805-R3.fit
Flat=D:\temp\Flats\MFR.fit
AlignMethod=1
CombineMethod=1
ExtraFilters=1
And here is an example to build the text at runtime (you don't need the $ in the string variables):

viewtopic.php?f=5&t=293

you may use a loop to add automatically the files:
Image=i1
Image=i2
..

another example:

Code: Select all

dir = "C:\users\user\desktop\Temp\"
pre = "#PREPROCESSING" + CRLF
pre = pre + "Dark = " + dir + "D300.fit" + CRLF
pre = pre + "Image = " + dir + "FR1.fit" + CRLF
pre = pre + "Image = " + dir + "FR2.fit" + CRLF
pre = pre + "Image = " + dir + "FR3.fit" + CRLF
pre = pre + "AlignMethod=1" + CRLF
pre = pre + "CombineMethod=1" + CRLF
print pre
Preprocessing(pre)
by the way, it's also quick to select the files for a manual preprocessing: just click on "i1", press SHIFT, then click on "i10" to select all the files in between.

User avatar
Rudi
Posts: 83
Joined: 08 Jan 2019, 04:47

Re: Scripting functions for stacking?

Post by Rudi » 27 Oct 2019, 20:00

Great, thanks Fabio, just what I was looking for.
/Rudi

Post Reply