Commit 2da113a0 authored by Sander ter Veen's avatar Sander ter Veen

Added pulsar pipeline to PDF, type only.

parent 334fac05
......@@ -52,7 +52,7 @@ app.title = 'LUCI - LOFAR Unified Calculator for Imaging'
Output('pipeTypeRow', 'options'),
Output('pipeTypeRow', 'value'),
Output('imNoiseRowL', 'style'),
Output('imNoiseRow', 'style')
],
......@@ -403,16 +403,25 @@ def on_resolve_click(n, close_msg_box, target_name, is_open):
State('distance-table', 'figure'),
State('dateRow', 'date'),
State('obsModeRow', 'value'),
State('tabModeRow', 'value'),
State('stokesRow', 'value')
State('stokesRow', 'value'),
State('tAvgPulpRow', 'value'),
State('8bitRow', 'value'),
State('digifilRow', 'value'),
State('pdmpRow', 'value'),
State('singlePulseRow', 'value'),
State('rratsRow', 'value'),
]
)
def on_genpdf_click(n_clicks, close_msg_box, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan,
n_sb, integ_t, ant_set, coord, pipe_type, t_avg, f_avg, is_dysco,
im_noise_val, raw_size, proc_size, pipe_time, is_msg_box_open,
elevation_fig, distance_table, obs_date, obs_mode, tab_mode, stokes):
elevation_fig, distance_table, obs_date, obs_mode, tab_mode, stokes, pulp_avg, pulp_8bit, pulp_digifil, pulp_pdmp, pulp_singlepulse, pulp_rrats):
"""Function defines what to do when the generate pdf button is clicked"""
if is_msg_box_open is True and close_msg_box is not None:
# The message box is open and the user has clicked the close
......@@ -435,8 +444,9 @@ def on_genpdf_click(n_clicks, close_msg_box, obs_t, cal_t, n_cal, n_core, n_remo
g.generate_pdf(rel_path, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan,
n_sb, integ_t, ant_set, coord, pipe_type, t_avg, f_avg,
is_dysco, im_noise_val, raw_size, proc_size, pipe_time,
elevation_fig, distance_table, obs_date,
obs_mode, tab_mode, stokes)
elevation_fig, distance_table, obs_date,
obs_mode, tab_mode, stokes,
pulp_avg, pulp_8bit, pulp_digifil, pulp_pdmp, pulp_singlepulse, pulp_rrats)
return {'display':'block'}, '/luci/{}'.format(rel_path), False
@app.server.route('/luci/static/<resource>')
......@@ -563,7 +573,7 @@ def on_calculate_click(n, n_clicks, obs_t, cal_t, n_cal, n_core, n_remote, n_int
raw_size = bk.calculate_bf_size(int(n_sb), int(n_chan), \
n_pol, n_value, float(integ_t), \
float(obs_t))
if pipe_type == 'none':
# No pipeline
pipe_time = None
......
......@@ -74,7 +74,8 @@ def make_pdf_plot(elevation_fig, outfilename):
def generate_pdf(pdf_file, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan, n_sb, integ_t,
antenna_set, coord, pipe_type, t_avg, f_avg, is_dysco, im_noise_val,
raw_size, proc_size, pipe_time, elevation_fig, distance_table,
obs_date, obs_mode, tab_mode, stokes):
obs_date, obs_mode, tab_mode, stokes,
pulp_avg, pulp_8bit, pulp_digifil, pulp_pdmp, pulp_singlepulse, pulp_rrats):
"""Function to generate a pdf file summarizing the content of the calculator.
Return nothing."""
# Create an A4 sheet
......@@ -94,7 +95,7 @@ def generate_pdf(pdf_file, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan,
string += '<thead><tr><th width="70%" align="left">Parameter</th>'
string += '<th width="30%" align="left">Value</th></tr></thead>'
string += '<tbody>'
if obs_mode == 'Interferometric':
string += '<tr><td>Observation mode</td>'
string += ' <td>Interferometric</td></tr>'
......@@ -105,9 +106,9 @@ def generate_pdf(pdf_file, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan,
string += ' <td>{}</td></tr>'.format(tab_mode)
string += '<tr><td>Stokes products to record</td>'
string += ' <td>{}</td></tr>'.format(stokes)
string += '<tr></tr>'
string += '<tr><td>Observation time (in seconds)</td>'
string += ' <td>{}</td></tr>'.format(obs_t)
string += '<tr><td>Calibrator duration (in seconds)</td>'
......@@ -140,7 +141,7 @@ def generate_pdf(pdf_file, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan,
string += '<tr><td>Pipeline type</td>'
if pipe_type == 'none':
string += ' <td>{}</td></tr>'.format('None')
else:
elif pipe_type == 'preprocessing':
string += ' <td>{}</td></tr>'.format('Preprocessing')
string += '<tr><td>Averaging factor (time, freq)</td>'
string += ' <td>{}, {}</td></tr>'.format(t_avg, f_avg)
......@@ -149,6 +150,9 @@ def generate_pdf(pdf_file, obs_t, cal_t, n_cal, n_core, n_remote, n_int, n_chan,
string += ' <td>{}</td></tr>'.format('enabled')
else:
string += ' <td>{}</td></tr>'.format('disabled')
elif pipe_type == 'pulp':
string += ' <td>{}</td></tr>'.format('Pulp')
if obs_mode == 'Interferometric':
string += '<tr></tr>'
string += '<tr><td>Theoretical image sensitivity (uJy/beam)</td>'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment