summaryrefslogtreecommitdiff
path: root/faraday/ouput_psr_vs_detuning_combo.m
blob: 154effc2401b224d1c6b727998e835db114194b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function ret=ouput_psr_vs_detuning_combo( ...
	psr_rad_tnEp_pos_el, psr_rad_tnEp_neg_el, ...
	psr_rad_smEp_pos_el, psr_rad_smEp_neg_el, ...
	psr_rad_lgEp_pos_el, psr_rad_lgEp_neg_el, ...
	psr_rad_grEp_pos_el, psr_rad_grEp_neg_el ...
	, detuning_freq, B_field, theta, phi, psi_el ...
	, output_dir)

	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	figure(6);	
	tn_cl='blue';
	sm_cl='green';
	lg_cl='magenta';
	gt_cl='red';
	
	plot ( ...
		  detuning_freq, psr_rad_tnEp_pos_el, '-;tn,pos el;', "linewidth",3, 'color',tn_cl
		, detuning_freq, psr_rad_tnEp_neg_el, '-;tn,neg el;', "linewidth",1, 'color',tn_cl
		, detuning_freq, psr_rad_smEp_pos_el, '-;sm,pos el;', "linewidth",3, 'color',sm_cl
		, detuning_freq, psr_rad_smEp_neg_el, '-;sm,neg el;', "linewidth",1, 'color',sm_cl
		, detuning_freq, psr_rad_lgEp_pos_el, '-;lg,pos el;', "linewidth",3, 'color',lg_cl
		, detuning_freq, psr_rad_lgEp_neg_el, '-;lg,neg el;', "linewidth",1, 'color',lg_cl
		, detuning_freq, psr_rad_grEp_pos_el, '-;gr,pos el;', "linewidth",3, 'color',gt_cl
		, detuning_freq, psr_rad_grEp_neg_el, '-;gr,neg el;', "linewidth",1, 'color',gt_cl
		);
	
	str_title=sprintf("PSR. B field=%.5f Gauss, ellipticity=%.2f rad, theta=%.2f, phi=%.2f", B_field, psi_el, theta, phi);
	title(str_title);
	xlabel('detuning, MHz');
	ylabel('PSR, radians');
	fname=data_file_name(output_dir, 'PSR.','pdf', B_field, theta,phi,psi_el);
	print(fname);

	ret=true;
endfunction