inpta / pinta

Data analysis pipeline for upgraded GMRT pulsar data
GNU General Public License v2.0
3 stars 0 forks source link

pinta --test option fails #28

Closed pratikta16 closed 3 years ago

pratikta16 commented 3 years ago

After gptool > ugmrt2fil > dspsr, error thrown while interpreting the following function in pintaexec.py (line 146) -

def run_dspsr(session, item, branch, xnbin=False): program = 'dspsr' exec_cmd(session, item, branch, program, xnbin=xnbin)

# Checking if output file is created
if not xnbin:
    fits_file = "./" + output_file_name(session, item, branch, 'fits')
else:
    fits_file = "./" + output_file_name(session, item, branch, '{}xNBin.fits'.format(session.xnbinfac))

if not os.access(fits_file, os.F_OK):
    print("[ERROR] dspsr failed to create file {} ... Quitting...".format(fits_file))
    raise OSError

Crosschecks - Tried running pinta with (a) --no-gptool, (b) --no-rficlean and (c) the full version. Works fine. Summary files generated as expected. So, probably no path issues. Only fails when pinta is invoked with the --test option.

Observations - It may have something to do with the naming conventions. gptool output is renamed as per ugmrt2fil convention as (say) - mv ./J2124-3358.09Mar2020.band3cdp.dat.gpt ./J2124-3358_58917.211001_500.gptool.gpt.dat The renaming command doesn’t get displayed on screen following gptool execution during --test run.

abhisrkckl commented 3 years ago

The check if not os.access(fits_file, os.F_OK) should not have been performed while running in --test mode. I will fix this once this round of testing is over.

pratikta16 commented 3 years ago

Ok. Got it.