Menu

Are -analyse and friends broken on Windows?

Dale Ghent
2021-07-31
2021-07-31
  • Dale Ghent

    Dale Ghent - 2021-07-31

    Hey Han,

    I was looking to play around with HFD analysis and I can't seem to get it working in Windows under either cmd.exe or PowerShell.

    Executing the following:

    astap.exe -f sample.fits -analyse 30
    

    This does not produce any output and the %errorlevel% is set to 0. It is also set to 0 (True) when checking $? under Powershell.

    It appears to work on macOS, but the exit code is still set to 0.

    [daleg@iridium]~$ /Applications/ASTAP.app/Contents/MacOS/astap -f sample.fits -analyse 30
    HFD_MEDIAN=4.4
    STARS=575
    
    [daleg@iridium]~$ echo $?
    0
    

    Am I missing something? -analyse2 on Windows acts the same way. -extract appears to work fine, producing a CSV file in the same directory as the image being analysed.

     
  • han.k

    han.k - 2021-07-31

    It still works. For Window you could test it as follows:

    c:\astap.fpc\astap.exe -f c:\astap.fpc\test_files\command_line_test\m16.fit -analyse 30
    echo Exit Code is %errorlevel%
    pause

    For Linux the exitcode was limited to 0..255 plus some people thought it was not a good idea. There the output goes to stdout. The exitcode is only used for errors.

    For the Mac the same, only stdout output. The exitcode is only used for errors.

    For Windows it is possible to compile with stdout open. Probably you could also the stripped command-line version astap_cli.exe for this. Haven't tested this one for some time.

    Regards, Han

     

    Last edit: han.k 2021-07-31
  • han.k

    han.k - 2021-07-31

    For astap_cli.exe you get both:

    C:\astap.fpc\command_line_version>c:\astap.fpc\command_line_version\astap_cli.exe -f  c:\astap.fpc\test_files\command_line_test\m16.fit -analyse 30
    HFD_MEDIAN=3.3
    STARS=703
    
    C:\astap.fpc\command_line_version>echo Exit Code is 325000703
    Exit Code is 325000703
    
    C:\astap.fpc\command_line_version>pause
    Press any key to continue . . .
    

    For astap.exe you get this:

    C:\astap.fpc\test_files\command_line_test>c:\astap.fpc\astap.exe -f  c:\astap.fpc\test_files\command_line_test\m16.fit -analyse 30
    
    C:\astap.fpc\test_files\command_line_test>echo Exit Code is 327000692
    Exit Code is 327000692
    
    C:\astap.fpc\test_files\command_line_test>pause
    Press any key to continue . . .
    
     

    Last edit: han.k 2021-07-31

Log in to post a comment.