Skip to content

Commit

Permalink
updates so plot_graphic_file_flow will run with beast call
Browse files Browse the repository at this point in the history
  • Loading branch information
lea-hagen committed Dec 17, 2020
1 parent 59311e1 commit ecf8733
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions beast/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
plot_cmd_with_fits,
plot_completeness,
plot_filters,
plot_graphic_file_flow,
plot_graphic_model,
plot_indiv_pdfs,
plot_noisemodel,
Expand Down Expand Up @@ -43,6 +44,7 @@ def main():
plot_cmd_with_fits,
plot_completeness,
plot_filters,
plot_graphic_file_flow,
plot_graphic_model,
plot_indiv_pdfs,
plot_noisemodel,
Expand Down
21 changes: 18 additions & 3 deletions beast/plotting/plot_graphic_file_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@
]


def plot_graphic_file_flow():
def plot_graphic_file_flow(plot_type="both", savefig="png"):
"""
Function to call the source density and subgrid functions
Parameters
----------
plot_type : string
Choose either 'subgrid', 'sd', or 'both' (case insensitive)
savefig : str (default='png')
set to the file extension of desired file to save image of model
"""

plot_graphic_file_flow_sd(n_sd=2, n_sub=3)
plot_graphic_file_flow_subgrid(n_sg=4)
if plot_type.lower() == "sd":
plot_graphic_file_flow_sd(n_sd=2, n_sub=3, savefig=savefig)
elif plot_type.lower() == "subgrid":
plot_graphic_file_flow_subgrid(n_sg=4, savefig=savefig)
elif plot_type.lower() == "both":
plot_graphic_file_flow_sd(n_sd=2, n_sub=3, savefig=savefig)
plot_graphic_file_flow_subgrid(n_sg=4, savefig=savefig)
else:
raise ValueError("plot_type must be 'subgrid', 'sd', or 'both'")


def plot_graphic_file_flow_sd(n_sd=1, n_sub=3, savefig="png"):
Expand Down

0 comments on commit ecf8733

Please sign in to comment.