From 116dd714d435c74f5b685a47dd893dc6a3fe6f62 Mon Sep 17 00:00:00 2001 From: Kevin Milner Date: Wed, 13 Dec 2023 12:03:51 -0800 Subject: [PATCH] now sets corner freq to NaN if not supplied --- src/main/java/scratch/kevin/bbp/BBP_SourceFile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/scratch/kevin/bbp/BBP_SourceFile.java b/src/main/java/scratch/kevin/bbp/BBP_SourceFile.java index e7f53cb6..2a0b4009 100644 --- a/src/main/java/scratch/kevin/bbp/BBP_SourceFile.java +++ b/src/main/java/scratch/kevin/bbp/BBP_SourceFile.java @@ -189,7 +189,7 @@ public static BBP_SourceFile readFile(File file) throws IOException { double hypoDownDip = Double.parseDouble(vals.get("HYPO_DOWN_DIP")); double dWid = Double.parseDouble(vals.get("DWID")); double dLen = Double.parseDouble(vals.get("DLEN")); - double cornerFreq = Double.parseDouble(vals.get("CORNER_FREQ")); + double cornerFreq = vals.containsKey("CORNER_FREQ") ? Double.parseDouble(vals.get("CORNER_FREQ")) : Double.NaN; int seed = Integer.parseInt(vals.get("SEED")); BBP_PlanarSurface surface = new BBP_PlanarSurface(topCenter, length, width, mech);