Version 1 (modified by 5 years ago) ( diff ) | ,
---|
How to fix files rejectes by Ingest
- First, backup the source directories in case something goes wrong with the repair process
- just use the scripts
~fact_arc/ingestScripts/fixSlowDirectory.sh <directory>
~fact_arc/ingestScripts/fixRawDirectory.sh <directory>
depending on the type of file being recovered
If some files were really corrupt, they will have some leftover .fitscorrupt0 in the source directory. In this case this file must be merged with the (hopefully) already recovered .fits file. If some .fits file remain in the failed directory, it is most likely dues to some warnings being exhibited by fverify. You decide whether to put them in the archive anyway or not. Usually it is simply duplicated column names (e.g. Time vs time).
HOW TO MERGE 2 SLOW CONTROL FITS: go to ~fact_arc/ingestScripts. All sources of programs used here are in this directory.
- list timestamps and look visually for defects near the end of the file:
/swdev_nfs/FACT++/fitsdump -c Time <first, most likely corrupt file>
- merge the two files, minus the number of corrupt rows of the first file:
mergeFits <first_file> <second_file> <target,merged file> <number of rows to ignore in the first file>
- make sure that only valid values remain:
/swdev_nfs/FACT++/fitsdump -c Time --minmax —nozero <target, merged file>
- make sure that the produced file is valid:
fverify <target, merged file>
- fix the keywords headers and checksum:
fixHeaderKeywordsSlowControl.sh <target, merged file> <fully fixed file>
If it goes well, the message <fully fixed file> has been created
is displayed. If this message isn't displayed something is wrong: you must investigate further....
- move the final product back into place