mirror of
https://gitlab.science.ru.nl/mthesis-edeboone/m.internship-documentation.git
synced 2024-12-22 13:03:32 +01:00
Figure: src: beacon field sizing
This commit is contained in:
parent
5e9f5d5621
commit
47016f867e
2 changed files with 37 additions and 8 deletions
|
@ -47,20 +47,31 @@ field_single_center_time_nomax.%: src/beacon_field.py
|
|||
$< --time $@ single-center --max-rms 0
|
||||
|
||||
field_three: \
|
||||
field_three_left \
|
||||
field_three_center \
|
||||
#
|
||||
field_three_left: \
|
||||
field_three_left_time.pdf field_three_left_time.png \
|
||||
field_three_left_phase.pdf field_three_left_phase.png \
|
||||
field_three_left_time_nomax.pdf field_three_left_time_nomax.png \
|
||||
field_three_left_phase_nomax.pdf field_three_left_phase_nomax.png \
|
||||
#
|
||||
field_three_center: \
|
||||
field_three_center_time.pdf field_three_center_time.png \
|
||||
field_three_center_phase.pdf field_three_center_phase.png \
|
||||
field_three_left_time_nomax.pdf field_three_left_time_nomax.png \
|
||||
field_three_center_time_nomax.pdf field_three_center_time_nomax.png \
|
||||
field_three_center_phase_nomax.pdf field_three_center_phase_nomax.png \
|
||||
#
|
||||
|
||||
|
||||
field_three_left_time.%: src/beacon_field.py
|
||||
$< --time $@ three-left
|
||||
field_three_left_phase.%: src/beacon_field.py
|
||||
$< --phase $@ three-left
|
||||
field_three_left_time_nomax.%: src/beacon_field.py
|
||||
$< --time $@ three-left --max-rms 0
|
||||
field_three_left_phase.%: src/beacon_field.py
|
||||
$< --phase $@ three-left
|
||||
field_three_left_phase_nomax.%: src/beacon_field.py
|
||||
$< --phase $@ three-left --max-rms 0
|
||||
|
||||
field_three_center_time.%: src/beacon_field.py
|
||||
$< --time $@ three-center
|
||||
|
@ -68,8 +79,8 @@ field_three_center_time_nomax.%: src/beacon_field.py
|
|||
$< --time $@ three-center --max-rms 0
|
||||
field_three_center_phase.%: src/beacon_field.py
|
||||
$< --phase $@ three-center
|
||||
field_three_center_time_nomax.%: src/beacon_field.py
|
||||
$< --time $@ three-center --max-rms 0
|
||||
field_three_center_phase_nomax.%: src/beacon_field.py
|
||||
$< --phase $@ three-center --max-rms 0
|
||||
|
||||
|
||||
field_square: \
|
||||
|
|
|
@ -255,6 +255,20 @@ if __name__ == "__main__":
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
if False: #specific formatting
|
||||
from matplotlib import rcParams
|
||||
#rcParams["text.usetex"] = True
|
||||
rcParams["font.family"] = "serif"
|
||||
rcParams["font.size"] = "12"
|
||||
if True:# small
|
||||
figsize = (6, 4)
|
||||
rcParams["font.size"] = "14" # 15 at 6,4 looks fine
|
||||
elif True: # large
|
||||
figsize = (9, 6)
|
||||
rcParams["grid.linestyle"] = 'dotted'
|
||||
rcParams["figure.figsize"] = figsize
|
||||
|
||||
|
||||
if args.fname == 'none':
|
||||
args.fname = None
|
||||
|
||||
|
@ -347,9 +361,10 @@ if __name__ == "__main__":
|
|||
kwargs = {}
|
||||
mask = None
|
||||
if plot_phase:
|
||||
color_label='$\\sqrt{ \\sum_{(i,j)} \\left(\\Delta\\varphi_{ij}(x) - \\Delta \\varphi_{ij}\\right)^2}$'
|
||||
min_val = min(val)
|
||||
mask = abs(val) > np.pi + min_val
|
||||
color_label='$\\sqrt{ \\sum_{(i,j)} \\left(\\Delta\\varphi_{ij}(x) - \\Delta \\varphi_{ij}\\right)^2}$ [rad]'
|
||||
if args.max_rms:
|
||||
min_val = abs(min(min(val), args.max_rms))
|
||||
mask = abs(val) > np.pi + min_val
|
||||
else:
|
||||
color_label='$\\sqrt{ \\sum_{(i,j)} \\left(\Delta t_{ij}(x) - \\Delta t_{ij}\\right)^2}$ [ns]'
|
||||
val *= 1e9
|
||||
|
@ -377,6 +392,9 @@ if __name__ == "__main__":
|
|||
if isinstance(args.fname, str):
|
||||
args.fname = [args.fname]
|
||||
|
||||
fig = plt.gcf()
|
||||
fig.tight_layout()
|
||||
|
||||
for fname in args.fname:
|
||||
plt.savefig(fname)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue