FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
b3139a67
Commit
b3139a67
authored
6 months ago
by
L. Bower
Browse files
Options
Downloads
Patches
Plain Diff
dropping the return of plotting outputs as not needed now we use workflow manager
parent
77d74981
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ews/coordinator/processor_epidemiology.py
+3
-28
3 additions, 28 deletions
ews/coordinator/processor_epidemiology.py
with
3 additions
and
28 deletions
ews/coordinator/processor_epidemiology.py
+
3
−
28
View file @
b3139a67
...
...
@@ -553,26 +553,6 @@ class ProcessorEpidemiology(ProcessorBase):
logger
.
debug
(
'
Saving tif output as png for easier viewing
'
)
plotRaster
.
save_raster_as_png
(
outfile
)
# comparison figure
# TODO: make this plot configurable? with function or args?
#logger.info('Plotting epi output alongside contributing components')
# figure_func = getattr(EpiAnalysis,'plot_compare_host_env_dep_infection')
logger
.
info
(
'
Plotting composite image of epi formulations
'
)
figure_func
=
getattr
(
EpiAnalysis
,
'
plot_compare_epi_cases
'
)
# isolate the config for this function, in case of modifications
config_epi_for_comparison
=
config
.
copy
()
fig
,
axes
,
cases
=
figure_func
(
config_epi_for_comparison
,
start_str
=
start_string
,
end_str
=
end_string
)
SaveFileName
=
f
"
{
case_specific_path
}
/EPI_
{
config_filename
}
_comparison
"
fig
.
savefig
(
SaveFileName
+
'
.png
'
,
dpi
=
300
)
# slice the epi results into before forecast and in forecast
for
epiconf
in
config
[
'
Epi
'
]:
...
...
@@ -633,8 +613,8 @@ class ProcessorEpidemiology(ProcessorBase):
return
proc_out
def
process_EWS_plotting_epi
(
self
,
jobPath
,
config
)
->
[
str
]:
'''
Returns a list of output files for transfer.
'''
def
process_EWS_plotting_epi
(
self
,
job_path
,
config
):
logger
.
info
(
'
started process_EWS_plotting_epi()
'
)
...
...
@@ -676,7 +656,7 @@ class ProcessorEpidemiology(ProcessorBase):
# TODO: handle multiple diseases and regions in Processor as a loop, or in the config
deposition_disease_name
=
[
disease_latin_name_dict
[
disease
]
+
'
_DEPOSITION
'
for
disease
in
diseases
][
0
]
ews_plot_dir
=
f
"
{
job
P
ath
}
/plotting/
"
ews_plot_dir
=
f
"
{
job
_p
ath
}
/plotting/
"
Path
(
ews_plot_dir
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
...
...
@@ -758,11 +738,6 @@ class ProcessorEpidemiology(ProcessorBase):
logger
.
error
(
'
EWS-Plotting did not produce any output
'
)
raise
RuntimeError
# provide to list for transfer
ews_plotting_outputs
:
[
str
]
=
[
item
for
ews_plotting_output
in
ews_plotting_output_globs
for
item
in
glob
(
ews_plotting_output
)]
return
ews_plotting_outputs
if
__name__
==
'
__main__
'
:
processor
=
ProcessorEpidemiology
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment