| 1 | = How to fix files rejectes by Ingest |
| 2 | |
| 3 | - First, backup the source directories in case something goes wrong with the repair process |
| 4 | - just use the scripts |
| 5 | * {{{~fact_arc/ingestScripts/fixSlowDirectory.sh <directory>}}} |
| 6 | * {{{~fact_arc/ingestScripts/fixRawDirectory.sh <directory>}}} |
| 7 | depending on the type of file being recovered |
| 8 | |
| 9 | 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). |
| 10 | |
| 11 | HOW TO MERGE 2 SLOW CONTROL FITS: go to ~fact_arc/ingestScripts. All sources of programs used here are in this directory. |
| 12 | 1. list timestamps and look visually for defects near the end of the file: |
| 13 | {{{ |
| 14 | /swdev_nfs/FACT++/fitsdump -c Time <first, most likely corrupt file> |
| 15 | }}} |
| 16 | 2. merge the two files, minus the number of corrupt rows of the first file: |
| 17 | {{{ |
| 18 | mergeFits <first_file> <second_file> <target,merged file> <number of rows to ignore in the first file> |
| 19 | }}} |
| 20 | 3. make sure that only valid values remain: |
| 21 | {{{ |
| 22 | /swdev_nfs/FACT++/fitsdump -c Time --minmax —nozero <target, merged file> |
| 23 | }}} |
| 24 | 4. make sure that the produced file is valid: |
| 25 | {{{ |
| 26 | fverify <target, merged file> |
| 27 | }}} |
| 28 | 5. fix the keywords headers and checksum: |
| 29 | {{{ |
| 30 | fixHeaderKeywordsSlowControl.sh <target, merged file> <fully fixed file> |
| 31 | }}} |
| 32 | 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.... |
| 33 | 6. move the final product back into place |