Skip to content

Scripts in this directory create an E/dE trend page plots, table, and the page itself.

Notifications You must be signed in to change notification settings

tisobe/EdE_Trends

Repository files navigation

Scripts in this directory create an E/dE trend page plots, table, and the page itself.

In a directory of /data/mta/Script/Grating/EdE_Trends:

---------------
ede_wrap_script
---------------
A wrapping script to run ede_main_script


---------------
ede_main__script
---------------
A main script to perl script ede_main.perl and ede_plot.py


-------------
ede_main.perl           
-------------
This script is a driving script, and run all other perl scripts in this directory

Input: None

Output: a part of stat_result.html page 
	update all html pages (modified date is updated to a date of the run)


-------------------
ede_find_value.perl     
-------------------
This script finds E/dE values for a given line and a grating

Input:	$line: line energy (such as 1.022)
	$grat: grating, htg, mtg, or ltg
	$dfile: data file, such as EdE_Data/acis_htg_1022_data (to read the past data)

	grating data are taken from one of the following data files

	/data/mta/www/mta_grat/*/*/obsid_*_L1.5_S1HEGp1_linelist.txt
	/data/mta/www/mta_grat/*/*/obsid_*_L1.5_S1MEGp1_linelist.txt
	/data/mta/www/mta_grat/*/*/obsid_*_L1.5_S1LEGp1_linelist.txt

Output:	$dfile: data file, updated data file
	$dfile2: only new data are saved in this file will be removed at the end of the session
		example: EdE_Data/acis_htg_1022_data_new



-------------
ede_plot.perl
-------------
This script plots DOM - E/dE relation ship. It fits two straight line by
a weighted linear least square method, and a robust method.

Input: 	$file: input data file name (e.g., EdE_Data/acis_htg_1022_data)
	       		format: 0014     0.825740    12   0.825140   1.307   0.258       631.1      89    
               			0.066784  0.016891    Apr 25 2000  4:33AM     277.19                    
				(obsid + data from grating page + DOM)

Output:	A gif file (name exaple: EdE_Plots/acis_htg_1022_plot.gif);



------------------
ede_comp_stat.perl      
------------------
This script computes weighted linear least square fits, robust fit, and Student's t probability

Input:	$file: input data file name (e.g.,  EdE_Data/acis_htg_1022_data)
	$line: line energy (e.g., 1.022)

Output:	stat_result.html (a part of this file is created in ede_main.perl)
		(line energy): (weighted slope) : (its error) : (robust slope) : (student t prob)


------------
ede_oba.perl            
------------
This script extracts OBA temperature data from a database and plots temperature - E/dE relationship
This one makes only for 1.022 keV line.

Input:	$file: newly found E/dE data list (e.g., from  EdE_Data/acis_htg_1022_data_new)
	
	we also need data from (for example): /OBA/ACIS_HTG_1022/oobthr20_out
	
Output: gif files:  /OBA/ACIS_HTG_1022/oba_#.gif (#=1 to 10). Each gif file contains 6 plots of temp - E/dE 
		    relation of different msids.


-------------
ede_hrma.perl
-------------
This script extracts HRMA temperature data from a database and plots temperature - E/dE relationship
This one makes only for 1.022 keV line.

Input:	$file: newly found E/dE data list (e.g., from  EdE_Data/acis_htg_1022_data_new)
	
	we also need data from (for example): /HRMA/ACIS_HTG_1022/4rt564t_out
	
Output: gif files:  /HRMA/ACIS_HTG_1022/hrma_#.gif (#=1 to 10). Each gif file contains 6 plots of temp - E/dE 
		    relation of different msids.


----------------------
ede_mk_stat_table.perl  
----------------------
This script computes linear regression sloopes and Student's t correlation probability for
OBA/HRMA temperature - E/dE relations.

Input: 	$dir: OBA/HRMA data files: e.g., /OBA/ACIS_HTG_1022/oobthr34_out

Output: stat_out.html
	


-------------------
ede_oba_example.perl    
-------------------
This script plots OBA temperature - EdE relationship example (oobthr53)

Input: 	/data/mta_www/mta_grat/EdE_trend/OBA/ACIS_MTG_1022/oobthr53_out

Output:	oba_example.gif


-----------------
ede_sort_dom.perl
-----------------
This script sorts E/dE data vy DOM value

Input: example: EdE_Data/acis_htg_0824_data

Output:	example: EdE_Data/acis_htg_0824_data

This script used manually to clean up data.


---------------------
plot_capella_ede.perl
---------------------
This script plot E/dE vs DOM specifically for Capella data saved on 
/data/mta/Script/Grating/EdE/Capplla.

Input: data file such as acis_hetg.dat (read /data/mta/Script/Grating/EdE/Capplla/table for more details).
Output: plot_lines.gif

This script must be run on rhodes with /opt/local/bin/perl as it uses PGPLOT perl module


############### NEW SCRPITS ########################

-----------
ede_plot.py
-----------
plotting evolution of EdE for ACIS S and HRC S grating obs

Input: /data/mta_www/mta_grat/EdE_trend/EdE_Data/*_data
Output: /data/mta_www/mta_grat/EdE_trend/EdE_Plots/*png

------
README
------
this file

####################################################

-------------------------------------------------
Directories and files outside of this directory
-------------------------------------------------

/data/mta/Script/Grating/Exc:		run directory

$bin_dir = '/data/mta4/MTA/bin/';		bin directory	 (need to run on rhodes)
$web_dir = '/data/mta_www/mta_grat/EdE_trend/';	Web direcotry
			---- these two directories can be changed in ede_main.perl


$bin_dir/ede*				all scripts described above are kept in this bin directory


$web_dir/EdE_Data: 			saving E/dE data
					such as acis_htg_0824_data

$web_dir/EdE_Plots:			saving time - E/dE plots
					such as acis_htg_0824_plot.gif

$web_dir/OBA				saving OBA related data

$web_dir/OBA/ACIS_HTG_1022		saving data such as oobthr23_out and oba_2.gif
$web_dir/OBA/ACIS_MTG_1022		
$web_dir/OBA/HRC_LTG_1022		

$web_dir/OBA/acis_htg_stat.html		ACIS HTEG statistics html page
$web_dir/OBA/acis_mtg_stat.html		ACIS MTEG statistics html page
$web_dir/OBA/hrc_ltg_stat.html		HRC  LTEG statistics html page

$web_dir/HRMA				saving HRMA related data

$web_dir/HRMA/ACIS_HTG_1022		saving data such as 4rt568t_out and hrma_1.gif
$web_dir/HRMA/ACIS_MTG_1022		
$web_dir/HRMA/HRC_LTG_1022		

$web_dir/HRMA/acis_htg_stat2.html	ACIS HTEG statistics html page
$web_dir/HRMA/acis_mtg_stat2.html	ACIS MTEG statistics html page
$web_dir/HRMA/hrc_ltg_stat2.html	HRC  LTEG statistics html page

$web_dir/Memo				saving memos related E/dE
$web_dir/Memo/EdE			E/dE memo of Capella
$web_dir/Memo/EdE2			E/dE memo of all grating data
$web_dir/Memo/EdE_Temp			E/dE and OBA/HRMA relation


$web_dir/ede_trend.html			E/dE main html page
$web_dir/ede_time.html			Time -  E/dE relaiton html page
$web_dir/ede_temp.html			OBA/HRMA - E/dE relaiton html page
$web-dir/stat_result.html		Time - E/dE relation statistics html page

$web_dir/Template			keeps copies of html pages, just in a case the others are lost

---------
Cron Job
---------

30 9 * * 0  cd /data/mta/Script/Grating/EdE/Exc; /data/mta/Script/Grating/EdE/EdE_Trends/ede_wrap_script      >> $HOME/Logs/ede_trends 2>&1

About

Scripts in this directory create an E/dE trend page plots, table, and the page itself.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published