Visualizaion and MultiScaleHighPass from script

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

Visualizaion and MultiScaleHighPass from script

Post by Rudi » 24 Jun 2024, 03:48

I have made a macro to run with the following lines:

Code: Select all

   Visualization(0, 65535)
   MultiscalehighPass(5, 6, 2, 1.46)
This works great, but I would like to automate it a bit more and run it from a script.
Are the above two functions available as script functions?
Or is it perhaps possible to run a macro from a script?

Code: Select all

fitsFiles = FindFiles(folder, "*.tif")
N = Count(fitsFiles)
for i = 1 to N
   Image.Open(folder + fitsFiles{i})

   ' this does not work:  Visualization(0, 65535)
   ' this does not work:  MultiScaleHighPass(5, 6, 2, 1.46)

   Image.SaveView(folder + "Scaled_and_MultiScaleHighPass\" + fitsFiles{i} + ".tiff")
   Image.Close
next i
/Rudi

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

Re: Visualizaion and MultiScaleHighPass from script

Post by Rudi » 24 Jun 2024, 03:52

Sorry for the trouble. Found the solution here, after some more Googling after some new keywords :oops: : viewtopic.php?t=440
Image.Macro(n)

Code: Select all

fitsFiles = FindFiles(folder, "*.tif")
N = Count(fitsFiles)
for i = 1 to N
   Image.Open(folder + fitsFiles{i})

   'Visualization(0, 65535)
   'MultiScaleHighPass(5, 6, 2, 1.46)
   'The above is in Macro #2
   Image.Macro(2) ' call Marco(2)

   Image.SaveView(folder + "Scaled_and_MultiScaleHighPass\" + fitsFiles{i} + ".tiff")
   Image.Close
next i
/Rudi

Post Reply