Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
L
LOFAR-calculator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Astronomy and Operations
SDC Operations
LOFAR-calculator
Commits
2da113a0
Commit
2da113a0
authored
Sep 30, 2020
by
Sander ter Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pulsar pipeline to PDF, type only.
parent
334fac05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
12 deletions
+26
-12
calculator.py
calculator.py
+17
-7
generatepdf.py
generatepdf.py
+9
-5
No files found.
calculator.py
View file @
2da113a0
...
...
@@ -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
...
...
generatepdf.py
View file @
2da113a0
...
...
@@ -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'
)
el
se
:
el
if
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>'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment