Question on using commandline in Windows

Hello all,

I am totally new to the Siril universe and would like to ask ( probably ) a
simple question.
I would like to calculate the FWHM of a fits file, taken with a mono camera
and output that value to the console ( cmd window ).
This is to use that value in an Observing Conditions driver.
Is there some example script I could use since “Boxselect” aparently doesn’t seem to do anything.
I tried the following .bat file:


echo OFF
FOR /F "tokens=2 " %%g IN (‘siril --version’) do (SET version=%%g)
set ext=fits

(
echo requires version
echo setext ext
echo load %1
echo boxselect “1681” “2291” “30” “30”
echo psf
echo close
) | “C:\Program Files\SiriL\bin\siril-cli.exe” -s - >nul 2>&1

pause


I would apreciate if someone could give me a hint where I go wrong,
maybe I should try for the PySiril route?
Thank you very much for your attention!
With kind regards,
Mert

Hi,

In this line, the output is redirected to nul, hence why there’s nothing written. Do this instead and you will get a trace:

) | "C:\Program Files\SiriL\bin\siril-cli.exe" -s - 2>&1

Now may I suggest using the command findstar if you want to measure the FWHM of all the stars in the image:

echo OFF
FOR /F "tokens=2 " %%g IN ('siril --version') do (SET version=%%g)

(
echo requires %version%
echo load %1
echo findstar
echo close
) | "C:\Program Files\SiriL\bin\siril-cli.exe" -s - 2>&1

pause

You will then get this line in your trace:
log: Found 66 Gaussian profile stars in image, channel #0 (FWHM 7.298625)

Otherwise, yes, if you know a bit of Python, PySiril is probably simpler.

Cheers,

Cecile

Thanks a lot Cecile, that willl help me on the track,
much apreciated!

Clear skies,
Mert

I tried this script from out of the cmd window and it gives me the wanted result:

echo OFF
FOR /F "tokens=2 " %%g IN (‘siril --version’) do (SET version=%%g)
set ext=fits
echo cd .\

(
echo requires version
echo setext ext
echo load %1
echo boxselect “1681” “2291” “30” “30”
echo psf -channel 0
echo close
) | “C:\Program Files\SiriL\bin\siril-cli.exe” -s - 2>&1 | findstr FWHM

pause

The only “problem” I see with it that it defaults to c:\users\name\Pictures folder
but that is easily solved with some more commands.

I really begin to like Siril a lot!!
Regards,
Mert

you can change the current working directory by passing the -d argument to the siril or siril-cli command line