njcuk9999 / apero-drs

A PipelinE to Reduce Observations - The DRS for SPIRou (CFHT)
MIT License
12 stars 0 forks source link

extract LFC files #715

Open clairem789 opened 1 year ago

clairem789 commented 1 year ago

Hi Neil, I wanted to extract the LFC files again, by using : apero_processing other_run.ini , where setting to True: RUN_PP_LFC and RUN_EXT_LFC I had done it before, with the same command according to my notes. I checked that the file exists and is accessible. Any clue what's going on? thanks!

But I got this error message (I copy the end of it) 21:29:16.502-@!|PROC|W[40-503-00019]: Error found for ID='531' 21:29:16.508-@!|PROC| apero_preprocess_spirou.py 2021-06-19 2618160a.fits --crunfile=other_run.ini --program=PP_LFC[00531] --recipe_kind=pre-lfc --shortname=PP_LFC --parallel=True 21:29:16.515- |PROC| *** 21:29:16.521- |PROC| E[01-001-00014]: Read Error: Fits-Image (data) could not be read. Filename = /Volumes/dataDRS/spirou/raw_lst/2021-06-19/2618160a.fits ext = 2 Error was type <class 'TypeError'>

Traceback (most recent call last): File "/Users/moutou/apero-drs/apero/io/drs_fits.py", line 644, in _read_fitsimage data = np.array(hdulist[ext].data) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/utils/decorators.py", line 837, in get val = self.fget(obj) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/hdu/image.py", line 250, in data data = self._get_scaled_image_data(self._data_offset, self.shape) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/hdu/image.py", line 809, in _get_scaled_image_data raw_data = self._get_raw_data(shape, code, offset) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/hdu/base.py", line 547, in _get_raw_data return self._file.readarray(offset=offset, dtype=code, shape=shape) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/file.py", line 378, in readarray return np.ndarray( TypeError: buffer is too small for requested array

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/moutou/apero-drs/apero/io/drs_fits.py", line 662, in _read_fitsimage data = deal_with_bad_file_single(filename, ext=ext, File "/Users/moutou/apero-drs/apero/io/drs_fits.py", line 1306, in deal_with_bad_file_single return np.array(hdulist[ext].data) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/utils/decorators.py", line 837, in get val = self.fget(obj) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/hdu/image.py", line 250, in data data = self._get_scaled_image_data(self._data_offset, self.shape) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/hdu/image.py", line 809, in _get_scaled_image_data raw_data = self._get_raw_data(shape, code, offset) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/hdu/base.py", line 547, in _get_raw_data return self._file.readarray(offset=offset, dtype=code, shape=shape) File "/Users/moutou/miniconda3/envs/apero-env-07286/lib/python3.9/site-packages/astropy/io/fits/file.py", line 378, in readarray return np.ndarray( TypeError: buffer is too small for requested array

njcuk9999 commented 1 year ago

"buffer is too small for requested array" is almost always a corrupted file on disk,

I would try re-downloading the file from CADC/CFHT.

clairem789 commented 1 year ago

OK thanks, I'll try that. I thought that it had prevented other jobs but in fact I have most of them.