Line data Source code
1 : ! ***********************************************************************
2 : !
3 : ! Copyright (C) 2014 The MESA Team
4 : !
5 : ! This program is free software: you can redistribute it and/or modify
6 : ! it under the terms of the GNU Lesser General Public License
7 : ! as published by the Free Software Foundation,
8 : ! either version 3 of the License, or (at your option) any later version.
9 : !
10 : ! This program is distributed in the hope that it will be useful,
11 : ! but WITHOUT ANY WARRANTY; without even the implied warranty of
12 : ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 : ! See the GNU Lesser General Public License for more details.
14 : !
15 : ! You should have received a copy of the GNU Lesser General Public License
16 : ! along with this program. If not, see <https://www.gnu.org/licenses/>.
17 : !
18 : ! ***********************************************************************
19 :
20 : module pgstar_logl_v
21 :
22 : use star_private_def
23 : use const_def, only: dp
24 : use pgstar_support
25 : use star_pgstar
26 :
27 : implicit none
28 :
29 : contains
30 :
31 0 : subroutine logL_v_Plot(id, device_id, ierr)
32 : integer, intent(in) :: id, device_id
33 : integer, intent(out) :: ierr
34 : type (star_info), pointer :: s
35 : ierr = 0
36 0 : call get_star_ptr(id, s, ierr)
37 0 : if (ierr /= 0) return
38 :
39 0 : call pgslct(device_id)
40 0 : call pgbbuf()
41 0 : call pgeras()
42 :
43 : call do_logL_v_Plot(s, id, device_id, s% pg% show_logL_photosphere_v, &
44 : s% pg% logL_v_xleft, s% pg% logL_v_xright, &
45 : s% pg% logL_v_ybot, s% pg% logL_v_ytop, .false., &
46 0 : s% pg% logL_v_title, s% pg% logL_v_txt_scale, ierr)
47 0 : if (ierr /= 0) return
48 :
49 0 : call pgebuf()
50 :
51 : end subroutine logL_v_Plot
52 :
53 :
54 0 : subroutine do_logL_v_Plot(s, id, device_id, show_photosphere_v, &
55 : xleft, xright, ybot, ytop, subplot, &
56 : title, txt_scale, ierr)
57 : use pgstar_hist_track, only: null_decorate, do_Hist_Track
58 : type (star_info), pointer :: s
59 : integer, intent(in) :: id, device_id
60 : real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
61 : logical, intent(in) :: subplot, show_photosphere_v
62 : character (len=*), intent(in) :: title
63 : integer, intent(out) :: ierr
64 : logical, parameter :: reverse_xaxis = .false., reverse_yaxis = .false.
65 : character (len=64) :: xname, xaxis_label
66 0 : ierr = 0
67 0 : if (show_photosphere_v) then
68 0 : xname = 'photosphere_v_km_s'
69 0 : xaxis_label = 'v\dphot (km/s)'
70 : else
71 0 : xname = 'v_surf_km_s'
72 0 : xaxis_label = 'v (km/s)'
73 : end if
74 : call do_Hist_Track(s, id, device_id, &
75 : xleft, xright, ybot, ytop, subplot, title, txt_scale, &
76 : xname, 'log_L', xaxis_label, 'log L/L\d\(2281)', &
77 : s% pg% logL_v_v_min, s% pg% logL_v_v_max, &
78 : s% pg% logL_v_v_margin, s% pg% logL_v_dv_min, &
79 : s% pg% logL_v_logL_min, s% pg% logL_v_logL_max, &
80 : s% pg% logL_v_logL_margin, s% pg% logL_v_dlogL_min, &
81 : s% pg% logL_v_step_min, s% pg% logL_v_step_max, &
82 : reverse_xaxis, reverse_yaxis, .false., .false., &
83 : s% pg% show_logL_v_target_box, s% pg% logL_v_target_n_sigma, &
84 : s% pg% logL_v_target_v, s% pg% logL_v_target_logL, &
85 : s% pg% logL_v_target_v_sigma, s% pg% logL_v_target_logL_sigma, &
86 : s% pg% show_logL_v_annotation1, &
87 : s% pg% show_logL_v_annotation2, &
88 : s% pg% show_logL_v_annotation3, &
89 : s% pg% logL_v_fname, &
90 : s% pg% logL_v_use_decorator, &
91 : s% pg% logL_v_pgstar_decorator, &
92 0 : null_decorate, ierr)
93 0 : end subroutine do_logL_v_Plot
94 :
95 : end module pgstar_logl_v
|