Skip to content

Commit

Permalink
New dcs16_push.yml workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSagan committed Oct 25, 2023
1 parent 921ca9f commit f14cea9
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ on:
# Run on pull requests
pull_request:

# Run on PR from DCS
workflow_run:
workflows: ["dcs16_push"]
types:
- completed

## Future Ideas:
## PR make it 10 or less
## For main and time based we can run something bigger
Expand All @@ -24,6 +30,7 @@ on:
# Configuration for the version of external dependencies
# We do this so we can cache them and avoid checking out that big
# repository at all times.

env:
EXTERNAL_DEPS_VERSION: main

Expand All @@ -47,7 +54,6 @@ jobs:
steps:
# Check out the code from GitHub
- uses: actions/checkout@v4
### - uses: mpi4py/setup-mpi@v1 "openmpi"

# Install system dependencies
- name: Install System Dependencies
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/dcs16_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Script to make a PR if the push is from DCS.

name: dcs16_push

on:
push:
branches-ignore: main

#

env:
EXTERNAL_DEPS_VERSION: main

#

jobs:
create-pull-request:
if: ${{ github.triggering_actor == 'DavidSagan' }}

runs-on: Ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: gh pr create -B main -H ${{ github.ref_name }} --title "${{ github.ref_name }}" --body "${{ github.event.head_commit.message }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Binary file modified bmad-doc/other_manuals/tune_scan.pdf
Binary file not shown.
10 changes: 8 additions & 2 deletions bsim/modules/ts_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module ts_mod
real(rp) :: Q_a0 = real_garbage$, Q_a1 = real_garbage$, dQ_a = real_garbage$
real(rp) :: Q_b0 = real_garbage$, Q_b1 = real_garbage$, dQ_b = real_garbage$
real(rp) :: Q_z0 = real_garbage$, Q_z1 = real_garbage$, dQ_z = real_garbage$
real(rp) :: pz0 = 0, pz1 = 0, dpz = 0
real(rp) :: pz0 = real_garbage$, pz1 = real_garbage$, dpz = real_garbage$
real(rp) :: a_emit = 0, b_emit = 0, sig_pz = 0
real(rp) :: a0_amp = 0, b0_amp = 0, pz0_amp = 0
real(rp) :: timer_print_dtime = 120
Expand Down Expand Up @@ -98,12 +98,18 @@ subroutine ts_init_params (ts, ts_com)

if (ts%rf_on) then
if (ts%Q_z0 == real_garbage$ .or. ts%Q_z1 == real_garbage$ .or. ts%dQ_z == real_garbage$) then
print '(a)', 'Error: One of ts%Q_z0, ts%Q_z1, ts%dQ_z is not set! Stopping here.'
print '(a)', 'Error: One of ts%Q_z0, ts%Q_z1, ts%dQ_z is not set with RF on! Stopping here.'
stop
endif
ts%Q_z0 = abs(ts%Q_z0)
ts%Q_z1 = abs(ts%Q_z1)
ts%dQ_z = abs(ts%dQ_z)

else
if (ts%pz0 == real_garbage$ .or. ts%pz1 == real_garbage$ .or. ts%dpz == real_garbage$) then
print '(a)', 'Error: One of ts%pz0, ts%pz1, ts%dpz is not set with RF off! Stopping here.'
stop
endif
endif

if (ts%dat_out_file == '') call file_suffixer(ts_com%master_input_file, ts%dat_out_file, 'dat', .true.)
Expand Down
4 changes: 2 additions & 2 deletions bsim/tune_scan/doc/tune_scan.tex
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

\title{Tune Scan Program}
\author{}
\date{David Sagan \\ October 22, 2023}
\date{David Sagan \\ October 24, 2023}
\begin{document}
\maketitle

Expand Down Expand Up @@ -281,7 +281,7 @@
\vn{ts%dQ_z} between points.
%
\item[ts\%pz0, ts\%pz1, ts\%dpz] \Newline
Only used when \vn{ts%rf_on} is set to True. In the RF off mode, the phase space $p_z$ of the
Only used when \vn{ts%rf_on} is set to False. In the RF off mode, the phase space $p_z$ of the
tracked particle is set to a certain value and a tune plane scan is made. $p_z$ is then changed and
a new tune plane scan is made, etc. The range of values for $p_z$ is set by \vn{[ts%p_z0, ts%p_z1]}
with a spacing of \vn{ts%dp_z} between points.
Expand Down

0 comments on commit f14cea9

Please sign in to comment.