Open mabaisen opened 1 year ago
It looks like the poln_state
is not included in read_subint_pol
yet. I should raise the correct exception in the function.
The PFITSReader
is still experimental and does not support all types of PSRFITS files as of yet.
When i use "PFITSReader" to read a fits file, then use "read_block" get the data, i have the problem:
Traceback (most recent call last): File "/home/mbs/Desktop/mycode/ASTROSOFT/sigpyproc3/read_fil.py", line 13, in
c = fil.read_block(start=1000, nsamps=2000)
File "/home/mbs/Desktop/mycode/ASTROSOFT/sigpyproc3/sigpyproc/readers.py", line 208, in read_block
data = self._fitsfile.read_subints(startsub, nsubs)
File "/home/mbs/Desktop/mycode/ASTROSOFT/sigpyproc3/sigpyproc/io/pfits.py", line 412, in read_subints
sdata = self.read_subint_pol(
File "/home/mbs/Desktop/mycode/ASTROSOFT/sigpyproc3/sigpyproc/io/pfits.py", line 464, in read_subint_pol
return data
UnboundLocalError: local variable 'data' referenced before assignment
How can i fix it.