dspsr tries to write a FITSFile even when -a option is used. For example, I have some FITS data and I run:
dspsr -b 256 -N J0534+2200 -s -a Timer /home/hknight/data/fitsfiles/J0534+2200/20130925A/20130925A_0007.fits
Note this is single pulse mode - this may have something to do with it
This induces an error in FITSArchive::unload_file
I am unsure how to easily inquire the archive type of an archive so don't know how to easily test it for non-single-pulse data.
I can confirm the "-a" option doesn't make a difference even when in non-single-pulse mode - dspsr always writes a FITSArchive
dspsr -b 256 -N J0534+2200 /home/hknight/data/fitsfiles/J0534+2200/20130925A/20130925A_0002.fits -T 1 -a Baseband
hknight@lazarus02:~/0534/singlepulse_20130925A_0002.fits$ ~/astro/dspsr/Signal/Pulsar/identifyarchive 2013-09-24-20:14:24.ar
itoa_code no alias found for unknown
N6Pulsar11FITSArchiveE
where the identifyarchive program works like this:
string archive_filename = argv[1];
Pulsar::Archive archive = Pulsar::Archive::load(archive_filename);
string class_name = typeid(archive).name();
cout << class_name << endl;
The fault lies in the dsp::Archiver::new_Archive method. This checks to see if the PhaseSeries has an OutputArchive extension, and if it does (which it always does), just returns a FITSArchive no matter what the user has specified.