Reprocessing RAMPs

If you decide that the on-line RAMP calibration is not sufficient, you must reprocess the data yourself. We have coded a simple script, fitramp_ecs_mecs.py (new version, from July 20), that reprocesses the RAMP from the raw data, skipping some points at the beginning of the series at user's command. Its usage is rather simple and explained below. Please note the following:

Usage:

python3 fitramp_ecs_mecs.py

This script needs 5 arguments:
        * the point from which to fit the slope.
        * the folder to get the raw data.
        * the folder to write the output data.
        * the first id number of the raw data.
        * the last id number of the raw data.

Example

python3 ../../fitramp_ecs.py 2 . . 1960366 1960698

The above example will process files from "0001960366-20190322-EMIR-STARE_SPECTRA_raw.fits" to "0001960698-20190322-EMIR-STARE_SPECTRA_raw.fits" (the list includes non-raw frames, but the script skips them). These files are located in the current folder. The resulting files will be named "NNNNNNNNNN-20190322-EMIR-STARE_SPECTRA_mod.fits", where NNNNNNNNNN is the register number of the last file in the ramp incremented by 1, and will be stored in the current folder as well '. The slope will be fitted considering only from read 2 onwards, inclusive. Pleae note that this version scans the input folder to locate the file with the initial id and gets the rest of the file name from it.

 

Output of the run

================

Procesados ficheros:  1960367 1960368 1960369 1960370 1960371 1960372 1960373 1960374 1960375
***** Escrito  0001960376-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960378 1960379 1960380 1960381 1960382 1960383 1960384 1960385 1960386
***** Escrito  0001960387-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960389 1960390 1960391 1960392 1960393 1960394 1960395 1960396 1960397
***** Escrito  0001960398-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960400 1960401 1960402 1960403 1960404 1960405 1960406 1960407 1960408
***** Escrito  0001960409-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960411 1960412 1960413 1960414 1960415 1960416 1960417 1960418 1960419
***** Escrito  0001960420-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960422 1960423 1960424 1960425 1960426 1960427 1960428 1960429 1960430
***** Escrito  0001960431-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960433 1960434 1960435 1960436 1960437 1960438 1960439 1960440 1960441
***** Escrito  0001960442-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960444 1960445 1960446 1960447 1960448 1960449 1960450 1960452 1960453
***** Escrito  0001960454-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960456 1960457 1960458 1960459 1960461 1960462 1960463 1960464 1960465
***** Escrito  0001960466-20190322-EMIR-STARE_SPECTRA.fits
Procesados ficheros:  1960468 1960469 1960470 1960472 1960473 1960474 1960475 1960476 1960477
***** Escrito  0001960478-20190322-EMIR-STARE_SPECTRA.fits