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_r
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_R_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_R_Plot( &
44 : s, id, device_id, s% pg% show_logL_photosphere_r, &
45 : s% pg% logL_R_xleft, s% pg% logL_R_xright, &
46 : s% pg% logL_R_ybot, s% pg% logL_R_ytop, .false., &
47 0 : s% pg% logL_R_title, s% pg% logL_R_txt_scale, ierr)
48 0 : if (ierr /= 0) return
49 :
50 0 : call pgebuf()
51 :
52 : end subroutine logL_R_Plot
53 :
54 :
55 0 : subroutine do_logL_R_Plot( &
56 : s, id, device_id, show_photosphere_r, &
57 : xleft, xright, ybot, ytop, subplot, &
58 : title, txt_scale, ierr)
59 : use pgstar_hist_track, only: null_decorate, do_Hist_Track
60 : type (star_info), pointer :: s
61 : integer, intent(in) :: id, device_id
62 : real, intent(in) :: xleft, xright, ybot, ytop, txt_scale
63 : logical, intent(in) :: subplot, show_photosphere_r
64 : character (len=*), intent(in) :: title
65 : integer, intent(out) :: ierr
66 : logical, parameter :: reverse_xaxis = .false., reverse_yaxis = .false.
67 : character (len=64) :: xname, xaxis_label
68 0 : ierr = 0
69 0 : if (show_photosphere_r) then
70 0 : xname = 'photosphere_r'
71 0 : xaxis_label = 'R\dphot\u/R\d\(2281)'
72 : else
73 0 : xname = 'radius'
74 0 : xaxis_label = 'R/R\d\(2281)'
75 : end if
76 : call do_Hist_Track(s, id, device_id, &
77 : xleft, xright, ybot, ytop, subplot, title, txt_scale, &
78 : xname, 'log_L', xaxis_label, 'log L/L\d\(2281)', &
79 : s% pg% logL_R_R_min, s% pg% logL_R_R_max, &
80 : s% pg% logL_R_R_margin, s% pg% logL_R_dR_min, &
81 : s% pg% logL_R_logL_min, s% pg% logL_R_logL_max, &
82 : s% pg% logL_R_logL_margin, s% pg% logL_R_dlogL_min, &
83 : s% pg% logL_R_step_min, s% pg% logL_R_step_max, &
84 : reverse_xaxis, reverse_yaxis, .false., .false., &
85 : s% pg% show_logL_R_target_box, s% pg% logL_R_target_n_sigma, &
86 : s% pg% logL_R_target_R, s% pg% logL_R_target_logL, &
87 : s% pg% logL_R_target_R_sigma, s% pg% logL_R_target_logL_sigma, &
88 : s% pg% show_logL_R_annotation1, &
89 : s% pg% show_logL_R_annotation2, &
90 : s% pg% show_logL_R_annotation3, &
91 : s% pg% logL_R_fname, &
92 : s% pg% logL_R_use_decorator, &
93 : s% pg% logL_R_pgstar_decorator, &
94 0 : null_decorate, ierr)
95 :
96 0 : end subroutine do_logL_R_Plot
97 :
98 : end module pgstar_logl_r
|