Skip to content

Commit

Permalink
Fixed a problem in generating corner graphs with insufficient data
Browse files Browse the repository at this point in the history
  • Loading branch information
Immudzen committed Oct 2, 2019
1 parent 8d09eed commit 5e415e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CADETMatch/CADETMatch.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<IsWindowsApplication>False</IsWindowsApplication>
<InterpreterId>CondaEnv|CondaEnv|CADETMatch</InterpreterId>
<LaunchProvider>Standard Python launcher</LaunchProvider>
<CommandLineArguments>"F:\temp\cadet_tutorial\install\fit\example.json" 2</CommandLineArguments>
<CommandLineArguments>"F:\temp\cadet_tutorial\lesson_4\fit_sse\example_sse.json" 2</CommandLineArguments>
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
<InterpreterArguments>-m scoop -n 6</InterpreterArguments>
</PropertyGroup>
Expand Down
3 changes: 3 additions & 0 deletions CADETMatch/generate_corner_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ def graphCorner(cache):
create_corner(out_dir, "corner_prod_transform.png", headers, data_input_transform, weights=weight_prod)

def create_corner(dir, filename, headers, data, weights=None):
if len(data) <= len(headers):
scoop.logger.info("There is not enough data to generate corner plots")
return
if numpy.all(numpy.min(data,0) < numpy.max(data,0)):
if weights is None or numpy.max(weights) > numpy.min(weights):
bounds = new_range(data).T
Expand Down

0 comments on commit 5e415e3

Please sign in to comment.