Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tao version update. #1373

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tao/code/tao_find_plots.f90
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ subroutine tao_find_plots (err, name, where, plot, graph, curve, print_flag, bla
plot_name = plot_name(4:)
endif

!
! Old name translation

if (len_trim(plot_name) > 1 .and. index('ddispersion', trim(plot_name)) == 1) plot_name = 'etap_dispersion'

! And find plots

if (plot_name(1:1) == '@') then
select case (plot_name(1:2))
Expand Down
58 changes: 42 additions & 16 deletions tao/code/tao_init_plotting.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1642,9 +1642,9 @@ subroutine tao_setup_default_plotting(include_dflt_lat_layout, include_dflt_floo
!---------------
! dbeta (chrom.dbeta) plot

if (all(s%plot_page%template%name /= 'dbeta')) then
if (all(s%plot_page%template%name /= 'dbeta_dpz')) then
call default_plot_init (np, plt, default_plot_g1c2)
plt%name = 'dbeta'
plt%name = 'dbeta_dpz'
plt%description = 'Chromatic normalized beta beat'

grph => plt%graph(1)
Expand All @@ -1671,15 +1671,15 @@ subroutine tao_setup_default_plotting(include_dflt_lat_layout, include_dflt_floo
!---------------
! deta (chrom.deta) plot

if (all(s%plot_page%template%name /= 'deta')) then
if (all(s%plot_page%template%name /= 'deta_dpz')) then
call default_plot_init (np, plt, default_plot_g1c2)
plt%name = 'deta'
plt%name = 'deta_dpz'
plt%description = 'Second order dispersion'

grph => plt%graph(1)
grph%p => plt
grph%title = 'Second order dispersion'
grph%y%label = '\(2265)\gy\fn/\(2265)\gd\fn (m)'
grph%y%label = 'd\gy\fn/dp\dz\u (m)'
grph%y%label_offset= .15

crv => grph%curve(1)
Expand All @@ -1700,10 +1700,10 @@ subroutine tao_setup_default_plotting(include_dflt_lat_layout, include_dflt_floo
!---------------
! detap (chrom.detap) plot

if (all(s%plot_page%template%name /= 'detap')) then
if (all(s%plot_page%template%name /= 'detap_dpz')) then
call default_plot_init (np, plt, default_plot_g1c2)
plt%name = 'detap'
plt%description = 'Second order dispersion slope'
plt%name = 'detap_dpz'
plt%description = 'Second order momentum dispersion'

grph => plt%graph(1)
grph%p => plt
Expand Down Expand Up @@ -1753,29 +1753,55 @@ subroutine tao_setup_default_plotting(include_dflt_lat_layout, include_dflt_floo
endif

!---------------
! Dispersion derivative plot
! deta/ds dispersion derivative plot

if (all(s%plot_page%template%name /= 'ddispersion')) then
if (all(s%plot_page%template%name /= 'deta_ds_dispersion')) then
call default_plot_init (np, plt, default_plot_g1c2)
plt%name = 'ddispersion'
plt%description = 'X & Y Dispersion Derivative'
plt%name = 'deta_ds'
plt%description = 'deta/ds dispersion derivatives'

grph => plt%graph(1)
grph%p => plt
grph%title = 'Dispersion Derivative'
grph%y%label = 'd\gy\fn\dX\u, d\gy\fn\dY\u'
grph%title = 'Dispersion Derivatives d\gy\fn/ds'
grph%y%label = 'd\gy\fn\dX\u/ds, d\gy\fn\dY\u/ds'

crv => grph%curve(1)
crv%name = 'x'
crv%g => grph
crv%data_type = 'deta_ds.x'
crv%legend_text = 'deta_x/ds'

crv => grph%curve(2)
crv%name = 'y'
crv%g => grph
crv%data_type = 'deta_ds.y'
crv%legend_text = 'deta_y/ds'
endif

!---------------
! etap dispersion derivative plot

if (all(s%plot_page%template%name /= 'etap_dispersion')) then
call default_plot_init (np, plt, default_plot_g1c2)
plt%name = 'etap_dispersion'
plt%description = 'Momentum dispersion (et)'

grph => plt%graph(1)
grph%p => plt
grph%title = 'Momentum Dispersion'
grph%y%label = 'dp\dx\u/dp\dz\u, dp\dy\u/dp\dz\u'

crv => grph%curve(1)
crv%name = 'x'
crv%g => grph
crv%data_type = 'etap.x'
crv%legend_text = 'd\gy\fn\dX\u'
crv%legend_text = 'etap_x'

crv => grph%curve(2)
crv%name = 'y'
crv%g => grph
crv%data_type = 'etap.y'
crv%legend_text = 'd\gy\fn\dY\u'
crv%legend_text = 'etap_y'
endif

!---------------
Expand Down
12 changes: 12 additions & 0 deletions tao/code/tao_param_value_at_s.f90
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ function tao_param_value_at_s (data_type, ele, orbit, err_flag, why_invalid, pri
if (present(why_invalid)) why_invalid = 'INVALID DATA_TYPE: ' // quote(data_type)
end select

case ('deta_ds')
select case (d_type)
case ('deta_ds.a'); value = ele%a%deta_ds
case ('deta_ds.b'); value = ele%b%deta_ds
case ('deta_ds.x'); value = ele%x%deta_ds
case ('deta_ds.y'); value = ele%y%deta_ds
case default
err_flag = .true.
if (present(bad_datum)) bad_datum = .true.
if (present(why_invalid)) why_invalid = 'INVALID DATA_TYPE: ' // quote(data_type)
end select

case ('e_curl', 'e0_curl')
orb = orbit
if (prefix == 'e0_curl') then
Expand Down
2 changes: 1 addition & 1 deletion tao/version/tao_version_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
!-

module tao_version_mod
character(*), parameter :: tao_version_date = "2025/01/22 20:06:16"
character(*), parameter :: tao_version_date = "2025/01/22 22:35:54"
end module
Loading