Changes

Mookodi

4,979 bytes added, 31 January
/* Data Reduction Pipelines */
Mookodi is a low resolution spectrograph and imager, designed to be operated fully robotically. It was designed and built by Liverpool John Moores University (LJMU), and installed on the Lesedi telescope in December 2021. It will undergo a period of science commissioning observations during  '''This ([[Media:Mookodi_JATIS_N-Erasmus.pdf|paper]]) describes the first trimester of 2022, instrument in detail. Please also cite this paper when publishing data collected with the ability to do spectroscopy and low-cadence imagingthis instrument.''' (for a higher resolution version go [https://doi.org/10.1117/1.JATIS.10.2.025005 here] )
== Instrument Description ==
=== Specifications ===
*'''Camera''': [[Media:Andor iKon-M 934 Specifications.pdf|Andor DU934P]] deep depletion camera, 1024 × 1024 CCD, 13 μm pixels ([[FileMedia:Mookodi iKon test.pdf|CCD performance test sheet]])
*'''Spectral range:''' 400.5&thinsp;&ndash;&thinsp;799.5&thinsp;nm <ref name="spec">Preliminary values based on lab tests at LJMU or original spec. Actual values to be confirmed during commissioning.</ref>
*'''Spectral resolution:'''
*:'''Dispersion:''' 3.88&thinsp;&Aring;/px
*:'''Resolution:'''
*::80µm (2 arcseconds) slit
*:::R = 301.0 @4671.23&thinsp;&Aring;
*:::R = 374.4 @5823.89&thinsp;&Aring;
*:::R= 492.5 @7642.02&thinsp;&Aring;
*::160µm (4 arcseconds) slit
*:::R = 172 @4671.23&thinsp;&Aring;
*'''Plate scale:''' 0.588 arcsec/px
*Low-cadence imaging: the camera is not a frame transfer camera, and in normal operation exposures are readout after the closure of an iris shutter. The shutter is life-cycle limited and not suitable for high-cadence observations.
*High-cadence imaging: it is possible to deactivate the shutter and take continues short exposure but users should be aware that the camera is not a frame transfer camera and this mode will result in some readout smearing. There is currently also no GPS triggering of the exposures and that the time recorded in the header (Keyword = DATE-OBS, note: is the start of the exposure) is obtained from the CPU time that is NTP synched. However, the header time has been measured to be accurate within at least 100ms of exact time (see [[Mookodi time-stamp tests|here]]). '''NB. High cadence observing (e.g. multiple continues exposures with exposure times < 60sec) SHOULD NOT be done with the shutter on AUTO mode. It is very important to set the shutter to "ALWAYS OPEN" which will deactivate the shutter in the open state but flush the CCD before the start of each new exposure. Failure to do so will likely cause serious damage to the camera's shutter'''
 
== Data Reduction Pipelines ==
=== Bias Correction and Flat-fielding ===
We now collect automated biases and flats at the start of the night that we collate into monthly master files for users. The files can be obtained [https://io.saao.ac.za/IO/mookodi/master_files/ here]. At that link you can also find a basic reduction python script that can be used to reduce the science files using the appropriate master bias/flat file.
 
* As an example the script can be used as follow (command arguments should be fairly self explanatory):
python mookodi_reduction_using_masters.py --image_dir /home/data/my_target/g --master_bias_file /home/bias/2025/01/2x2_fast.fits --master_flat_file /home/flats/2025/01/2x2_g_north_up.fits --remove_cosmic true
 
'''Some important notes:'''
*In the case of biases, "slow" and "fast" refers to the readout mode and for your science files that can be checked by looking at the "HSHIFT" keyword in the header: slow = 0.05 and fast = 5.0
*Mookodi's derotator cable-wrap does not have a full 360 degree range so the result is that some observations are taken with north up in the images while others flipped 180 degrees with north down in the images. It is roughly correlated to which side of the meridan your observations took place. Your science images can be a mix if a derotation occured during your observation sequence. There are also subtle changes in the telescope throughput for the two orientations so you need to use flats taken at the same orientation as your science images. The supplied reduction script will warn you if you are using flats at a different orientation than your science frames (but still reduce the files). If you are reducing the data yourself with your own software, you can check which orientation your science image was taken at by using the value of the ROTANGLE and ROTSKYPA header keywords. The sky-angle = ROTANGLE-ROTSKYPA. If the sky-angle is close to 0, 360 or -360 your images are with north '''DOWN'''. If the sky-angle is close to 180 or -180 your images are with north '''UP'''.
 
=== Spectroscopy ===
 
The python-based data reduction pipeline ASPIRED ([https://arxiv.org/pdf/2012.03505.pdf M. C. Lam et. al.]) developed for Mookodi's sister-instrument SPRAT is compatible and recommended for Mookodi spectroscopic data. General installation and usage instruction can be found [https://aspired.readthedocs.io/en/latest/index.html# here].
 
More specific Mookodi installation and usage instructions (see included README), with example code and data, can be downloaded [[Media:Mookodi ASPIRED example.zip|here]].
 
=== Photometry ===
Differential photometry can be extracted from Mookodi data using a new "SAAO version", TEA-Phot-SAAO, which is a modified TEA-Phot pipeline developed by Dominic Bowman and Daniel Holdsworth ([https://arxiv.org/pdf/1907.04421.pdf D. M. Bowman et. al])
==== Installation Instructions ====
'''NB. If you use the TEA-Phot-SAAO code to produce results for a scientific publication, we ask that you please adhere to the citation requests of the developers that are on the main repository page (link below).'''
 
 
*These instructions should be identical for a Linux or Mac environment and Python 3.7 or a later version is recommended.
*TEA-Phot-SAAO can be directly downloaded from [https://bitbucket.org/saao/tea-phot-saao here] or the repository can quickly be cloned through the following command in the terminal:
git clone https://bitbucket.org/saao/tea-phot-saao.git
* TEA-Phot-SAAO requires only four additional Python modules. To install (if not already) run the following command in the terminal:
pip install numpy matplotlib sep astropy
 
NB. you may need to use "pip3" if you haven't linked your pip to python 3.6+
 
==== Usage Instructions ====
 
* To reduce and extract photometry from Mookodi data using TEA-phot-SAAO, in the terminal navigate to the folder that contains the '''TEA-Phot.py''' file.
* To display basic usage and optional arguments run:
python TEA-Phot.py -h
NB. you may need to use "python3" if you haven't linked your python to python 3.6+
* A typical example to reduce and extract photomery from Mookodi data would be something like this:
python TEA-Phot.py SAAO Mookodi MKD --bias MKD --flat MKD --image_dir /full/path/to/science/fits/files/ --bias_dir /full/path/to/bias/fits/files/ --flat_dir /full/path/to/flat/fits/files/ --out_dir /full/path/to/chosen/output/directory/ --do_plot True --source_sigma 1.5
NB. you may need to use "python3" if you haven't linked your python to python 3.6+
* Wait for window to appear and select target and comparison star with mouse-clicks.
* Follow further prompts from the pipeline for inputs (aperture size etc.) in the terminal.
 
Note: TEA-phot will NOT do bias and flat field corrections if not BOTH flat AND bias files are supplied.
== Operating Mookodi ==
#*'''Binning:''' Options are 1×1, 2×2, 3×3, and 4×4.
#*'''Gain:''' High (faint objects), medium, and low (bright objects)
#*'''Rate (readout rate):''' Fast (5 MHz) - read-noise of 13.6 electrons, and slow (0.05 MHz) - read-noise of 3.3 electrons (see Andor spec sheet link at the top of page)
#*'''Image Type:''' This has no physical effect on the instrument configuration and only populates a header keyword with the selection (possibly useful for automated data reduction)
#*'''Instrument Mode:''' This has no physical effect on the instrument configuration and only populates a header keyword with the selection (possibly useful for automated data reduction)
#*TIPS: TODO.
''Note: It is advisable that DARK frames should be taken with the shutter in the "ALWAYS CLOSED" mode. BIAS frames (especially if multiple frames are taken) SHOULD ALWAYS be taken with the shutter in the "ALWAYS CLOSED" mode since this will deactivate the iris-shutter in the closed state and prolong the lifetime, see also [[#Suitable_Uses|high cadence imaging]] in the Suitable uses section at the top of this page.  == Data Access ==
From a terminal window:
scp mookodiobserver@mookodi.suth.saao.ac.za:/data/lesedi/mkd/yyyy/mmdd/* .<local path to copy to> Password: Same as username shown above with "Saao" prefixed. 
Where <code>yyyy</code> is the year, <code>mm</code> is the month, and <code>dd</code> is the day. The convention is that the data rolls over to the current date at 1200 UTC, hence all the files from a given night are stored in the folder corresponding to the date at the start of the night. e.g. All observations started on the night of 2021/12/11 will be stored in <code>/data/lesedi/mkd/2021/1211/</code>.
326
edits