Skip to content

tisobe/Acis_Count_Rate_py

Repository files navigation

This directory contains a set of python scripts which extracts ACIS
countrates for each CCD and creates trend plots.

#########
Directory
#########

'/data/mta/Script/ACIS/Count_rate/Scripts/'        :bin_dir
'/data/mta4/MTA/data/'                             :bdata_dir
'/data/mta/www/mta_dose_count2/'                   :web_dir
'/data/mta/Script/ACIS/Count_rate/house_keeping2/' :house_keeping
'/data/mta/Script/Python_script2.7/'               :mta_dir
'/usr/local/bin/'                                  :op_dir


#######
Scripts
#######

count_rate_wrap_script
count_rate_main_script  --- controlling tsh scripts

All scripts need the following environment setting:

setenv PYTHONPATH "/proj/sot/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages:$PYTHONPATH"

------------------
count_rate_main.py
------------------

The main script controlling all other python scripts

Input: comp_test   ---- if it is "yes", the test case will be run.

Needed script files:
------------------

convertTimeFormat.py    --- a set of time conversion related functions
mta_common_functions.py --- a set of mscrenious mta related funtions
(these are kpet in /data/mta/Script/Python_script2.7)

update_data_files.py    --- a set of scripts which are used to extract data
plot_count_rate.py      --- a set of scripts which create plots
print_html_page.py      --- a set of scripts which update html pages



--------------------
update_data_files.py
--------------------

This script updates/creates ACIS count rate data sets

Input: comp_test   ---- if it is "yes", the test case will be run.
                        if not, it reads data from the current data directory:
                                 /dsops/ap/sdp/cache/*/acis/*evt1.fits
                                 /dsops/ap/sdp/cache/*/ephin/*lc1.fits

Output: <LTTER MONTH><year> --- e.g. OCT2013. a directory to keep data and plots
        <outdir>ccd<ccd>    --- 5 min average data for ccd<ccd> in dom and (cnt/sec)
        <outdir>ephin_rate  --- ephin rate data

Needed script files:
------------------

convertTimeFormat.py    --- a set of time conversion related functions
mta_common_functions.py --- a set of mscrenious mta related funtions
(these are kpet in /data/mta/Script/Python_script2.7)


------------------
plot_count_rate.py
------------------

This script creates several trending plots related to ACIS count rates

Input: directory            --- a directory location e.g. OCT2013
       web_dir/*/ccd<ccd>   --- all past count rates 
       web_dir/*/ephin_rate --- all past ephin data

Output:<dir>acis_dose_ccd<ccd>.png --- trend of count rate for that month
       <dir>acis_dose_ccd_5_7.png  --- trend of ccd5, 6, and 7 for that month
       <dir>ephin_rate.png         --- trend of ephin rate for that month

       <web_dir>acis_ccd7_dose_plot.png --- a full range trend plot for ccd7
       <web_dir>long_term_plot.png      --- a full range trend plot for ccds 5, 6, and 7
       <web_dir>month_avg_bi.png        --- monthly average trend plots for back side CCDs
       <web_dir>month_avg_img.png       --- monthly average trend plots for imaging CCDs
       <web_dir>month_avg_spc.png       --- monthly average trend plots for spec CCDs

       <web_dir>monthly_avg_data_ccd<ccd>.dat --- monthly average data fro ccd<ccd>

Needed script files:
------------------

convertTimeFormat.py    --- a set of time conversion related functions
mta_common_functions.py --- a set of mscrenious mta related funtions
matplotlib              --- a plotting rouine
(these are kpet in /data/mta/Script/Python_script2.7)

------------------
print_html_page.py
------------------

This script creates/updates html pages

Input: directory            --- a directory location e.g. OCT2013

Output: <web_dir>main_acis_dose_plot.html  --- main page
        <web_dir>month_avg_bi.html       
        <web_dir>month_avg_im,html
        <web_dir>month_avg_spc.html

        <dir>acis_<moth><year>_dose_plot.html   e.g acis_oct2013_dose_plot
        <dir>acis_dose_ccd<ccd>.html
        <dir>acis_dose_ccd_5_7.html
        <dir>ephin_rate.html
        <dir>

########
CRON Job
########

0 3,9,15,21 * * *    cd /data/mta/Script/ACIS/Count_rate/Exc2/; /data/mta/Script/ACIS/Count_rate/Scripts/count_rate_wrap_script >> $HOME/Logs/acis_dose_py.cron 2>&1

About

ACIS Count Rate Scripts written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages