Menu ▾ ▴

#391 "convert" command doesn't work in script mode of psrsh

next release
closed-fixed
None
6
2014-06-09
2014-06-06
No

running:


psrsh> load archive.ar
ok
psrsh> convert PSRFITS
ok
psrsh> unload ext=fits
ok unload: data written to archive.fits
psrsh> exit


works perfectly fine.
However, running:


./convert.psh -e fits archive.ar
Unloading archive.fits ... done


leaves the file in the original format, i.e., Timer.
Contents of convert.psh are:


!/usr/bin/env psrsh

convert PSRFITS


Related

Bugs: #391

Discussion

  • Lawrence Toomey

    Lawrence Toomey - 2014-06-06

    Hi Stefan,

    I tried on my setup.

    I needed the 'unload' in the .psh file:


    !/usr/bin/env psrsh

    convert PSRFITS
    unload ext=fits


    ./convert.psh <timer archive=""></timer>

    Binary header of timer archive:

    none^@ none^@ FB^@
    ?<83><d7>
    ^@^@^@^@^@^@^@^B^@^@^@^@970915 ^@
    ?<ce><df>2^RBQ<9D>^@^@<c6>^R^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@J^@
    1833-0827^@
    @^So<ee><c4>9<a8><87><bf><c2><e5>h<8B><9E><8F><8A>A<bb>^V<87>=
    <81>^F%@UR<b3>o_\sC̀^@^@^@^@^A^@^@^@^@^@^@^@^@^@^@^A^@><80>^@^@C^U^@^@^@^@^@^A^@^@^@^B^@^@^@^A^@^@^@^B^@^@^@^A?<80>^@^@^@^@^@^A^@^@^@^P^@^@^@^@
    ^@ PARKES ^@ 10.006</b3></bb></e5></c2></bf></a8></c4></ee></c6></df></ce></d7>

    Binary header of psrfits output:

    SIMPLE = T / file does conform to FITS
    standard BITPIX = 8 / number of bits per
    data pixel NAXIS = 0 / number of data
    axes EXTEND = T / FITS
    dataset may contain extensions COMMENT FITS (Flexible Image
    Transport System) format is defined in 'AstronomyCOMMENT

    Cheers,

    On Sat, Jun 7, 2014 at 2:05 AM, Stefan Oslowski sosl@users.sf.net wrote:


    Status: open
    Group: next release
    Created: Fri Jun 06, 2014 04:05 PM UTC by Stefan Oslowski
    Last Updated: Fri Jun 06, 2014 04:05 PM UTC
    Owner: Stefan Oslowski

    running:

    psrsh> load archive.ar
    ok
    psrsh> convert PSRFITS
    ok
    psrsh> unload ext=fits
    ok unload: data written to archive.fits
    psrsh> exit


    works perfectly fine.
    However, running:


    ./convert.psh -e fits archive.ar
    Unloading archive.fits ... done


    leaves the file in the original format, i.e., Timer.
    Contents of convert.psh are:


    !/usr/bin/env psrsh

    convert PSRFITS


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/psrchive/bugs/391/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    Lawrence

     

    Related

    Bugs: #391

  • Stefan Oslowski

    Stefan Oslowski - 2014-06-09

    Hi Lawrence,

    Indeed, when "unload ext=fits" exists in the script then psrsh produces a valid PSRFITS archive. However, this is still a bug, it should also work when specifying unload options using any of the "-e", "-m", or "-O" options. I just checked that the resulting file is still a Timer archive with any of them.

    Cheers,
    Stefan

     
  • Willem van Straten

    • status: open --> closed-fixed
    • assigned_to: Stefan Oslowski --> Willem van Straten
    • Priority: 5 --> 6
     
  • Willem van Straten

    psrsh now implements the Application::result method, which allows out of place transformations in ::process

     

Log in to post a comment.