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:
convert PSRFITS
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:
--
Lawrence
Related
Bugs:
#391Hi 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
psrsh now implements the Application::result method, which allows out of place transformations in ::process