Skip to content

Commit

Permalink
Performance tweaks and bug fixes. (#142)
Browse files Browse the repository at this point in the history
* adds more expressions per Bodorkos and refactors

* corrects bug with extperr calculation

* refines reports for testing
  • Loading branch information
bowring committed Aug 9, 2018
1 parent aca0f62 commit e2c9a1e
Show file tree
Hide file tree
Showing 15 changed files with 668 additions and 517 deletions.
2 changes: 1 addition & 1 deletion common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apply plugin: 'java'
apply plugin: 'maven'

String mavenGroupId = 'org.cirdles'
String mavenVersion = '0.4.0'
String mavenVersion = '0.4.1'


sourceCompatibility = '1.8'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,9 @@ public void handle(ActionEvent e) {
private void produceGraphOnScrolledPane(int massCounter, String title, List<Double> data, MassStationDetail entry, VBox scrolledBox) {

int heightOfMassPlot = 150;
int widthOfView = squidProject.getPrawnFileRuns().size() * 25 + 350;
// aug 2018 to manage large spot counts and pixels used
int customSpotWidth = (1000 - squidProject.getPrawnFileRuns().size()) / 25;//was just 25, then 15
int widthOfView = squidProject.getPrawnFileRuns().size() * customSpotWidth + 350;

AbstractDataView canvas
= new MassStationAuditViewForShrimp(new Rectangle(25, (massCounter * heightOfMassPlot) + 25, widthOfView, heightOfMassPlot),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,9 @@ private void customizePlotChooserToolbarAndInvokePlotter() {
plotFlavorOneRadioButton.setText("Wetherill Concordia");
plotFlavorTwoRadioButton.setText("Tera-Wasserburg");
plotFlavorOneRadioButton.setDisable(false);
plotFlavorTwoRadioButton.setDisable(false);
plotFlavorTwoRadioButton.setDisable(true);

corr7_RadioButton.setVisible(false);
corr8_RadioButton.setDisable(true);
corr8_RadioButton.setVisible(true);

showConcordiaPlotsOfUnknownsOrRefMat();
Expand All @@ -399,7 +398,6 @@ private void customizePlotChooserToolbarAndInvokePlotter() {
plotFlavorOneRadioButton.setSelected(true);
plotFlavorTwoRadioButton.setDisable(true);
corr8_RadioButton.setVisible(true);
corr8_RadioButton.setDisable(false);
} else if (!isDirectAltPD && has232) {// perm3
plotFlavorOneRadioButton.setDisable(true);
plotFlavorTwoRadioButton.setSelected(true);
Expand Down Expand Up @@ -493,13 +491,15 @@ public Map<String, Object> getDatum() {
/**
* @return the selectedProperty
*/
@Override
public SimpleBooleanProperty getSelectedProperty() {
return selectedProperty;
}

/**
* @param selectedProperty the selectedProperty to set
*/
@Override
public void setSelectedProperty(SimpleBooleanProperty selectedProperty) {
this.selectedProperty = selectedProperty;
this.shrimpFraction.setSelected(selectedProperty.getValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ public static Map<String, Object> prepareWetherillDatum(

Map<String, Object> datum = new HashMap<>();
// default is for reference materials
String ratioBase75 = " 207Pb/235U";
String ratioBase68 = " 206Pb/238U";
String ratioBase75 = " 207*/235";
String ratioBase68 = " 206*/238";
String errCorr = "-errcorr";
if (isUnknown) {
ratioBase75 = " 207*/235";
ratioBase68 = " 206*/238";
ratioBase75 = " 207*/235S";
ratioBase68 = " 206*/238S";
errCorr = " err corr";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<?import javafx.scene.text.TextFlow?>
<?import javafx.scene.web.WebView?>

<SplitPane fx:id="mainPane" dividerPositions="0.0" maxHeight="-Infinity" maxWidth="-Infinity" styleClass="backgroundCalamari" stylesheets="@../css/projectManager.css" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.cirdles.squid.gui.expressions.ExpressionBuilderController">
<SplitPane fx:id="mainPane" dividerPositions="0.0" maxHeight="-Infinity" maxWidth="-Infinity" styleClass="backgroundCalamari" stylesheets="@../css/projectManager.css" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.cirdles.squid.gui.expressions.ExpressionBuilderController">
<items>
<SplitPane fx:id="leftSplitPane" dividerPositions="0.75" maxWidth="500.0" minWidth="275.0" orientation="VERTICAL" styleClass="backgroundCalamari">
<items>
Expand Down Expand Up @@ -126,7 +126,7 @@
<VBox prefHeight="149.0" prefWidth="275.0">
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Entities" />
<Accordion fx:id="othersAccordion">
<Accordion fx:id="othersAccordion" nodeOrientation="LEFT_TO_RIGHT">
<panes>
<TitledPane fx:id="constantsTitledPane" animated="false" text="Constants and Numbers">
<content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.cirdles.squid.constants.Squid3Constants;
import static org.cirdles.squid.constants.Squid3Constants.DUPLICATE_STRING;
import org.cirdles.squid.core.PrawnFileHandler;
import org.cirdles.squid.dialogs.SquidMessageDialog;
import org.cirdles.squid.exceptions.SquidException;
import org.cirdles.squid.prawn.PrawnFile;
import org.cirdles.squid.prawn.PrawnFile.Run;
Expand Down Expand Up @@ -137,6 +138,21 @@ public void createTaskFromImportedSquid25Task(File squidTaskFile) {

TaskSquid25 taskSquid25 = TaskSquid25.importSquidTaskFile(squidTaskFile);

// if Task is ashort of nominal masses, add them
int prawnSpeciesCount = Integer.parseInt(prawnFile.getRun().get(0).getPar().get(2).getValue());
if (prawnSpeciesCount != taskSquid25.getNominalMasses().size()) {
SquidMessageDialog.showWarningDialog(
"The PrawnFile has "
+ prawnSpeciesCount
+ " mass stations and the Task has "
+ taskSquid25.getNominalMasses().size()
+ " masses - please confirm.",
null);
for (int i = 0; i < (prawnSpeciesCount - taskSquid25.getNominalMasses().size()); i++) {
taskSquid25.getNominalMasses().add("DUMMY" + (i + 1));
}
}

// need to remove stored expression results on fractions to clear the decks
this.task.getShrimpFractions().forEach((spot) -> {
spot.getTaskExpressionsForScansEvaluated().clear();
Expand Down Expand Up @@ -510,6 +526,7 @@ public void updateFilterForRefMatSpotNames(String filterForRefMatSpotNames) {
task.setFilterForRefMatSpotNames(filterForRefMatSpotNames);
}
}

public String getFilterForConcRefMatSpotNames() {
return filterForConcRefMatSpotNames;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.util.Map;
import static org.cirdles.squid.tasks.expressions.builtinExpressions.BuiltInExpressionsDataDictionary.SQUID_PPM_PARENT_EQN_NAME_TH;
import static org.cirdles.squid.tasks.expressions.builtinExpressions.BuiltInExpressionsDataDictionary.SQUID_PPM_PARENT_EQN_NAME_U;
import static org.cirdles.squid.tasks.expressions.builtinExpressions.BuiltInExpressionsDataDictionary.SQUID_PRIMARY_UTH_EQN_NAME_TH;
import static org.cirdles.squid.tasks.expressions.builtinExpressions.BuiltInExpressionsDataDictionary.SQUID_PRIMARY_UTH_EQN_NAME_U;
import static org.cirdles.squid.tasks.expressions.builtinExpressions.BuiltInExpressionsDataDictionary.SQUID_TH_U_EQN_NAME;

/**
Expand All @@ -30,7 +32,6 @@
*/
public class ReportSpecificationsUPbReferenceMaterials extends ReportSpecificationsAbstract {


// Report column order =
// displayName1, displayName2, displayName3, displayName4, units, retrieveMethodName, retrieveParameterName, uncertaintyType,
// footnoteSpec, visible, useArbitrary? for value, digitcount value, unct visible (if required), description where needed,
Expand Down Expand Up @@ -70,9 +71,6 @@ public class ReportSpecificationsUPbReferenceMaterials extends ReportSpecificati
{"", "204", "/206", "(fr. 207)", "", "getTaskExpressionsEvaluationsPerSpotByField", "204/206 (fr. 207)", "PCT",
"", "true", "true", "6", "true", "", "false", "false"
},
// {"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "204/206 (fr. 207) %err", "",
// "", "true", "true", "0", "true", "", "false", "false"
// },
{"", "204", "/206", "(fr. 208)", "", "getTaskExpressionsEvaluationsPerSpotByField", "204/206 (fr. 208)", "",
"", "true", "true", "6", "true", "", "false", "false"
},
Expand All @@ -82,11 +80,12 @@ public class ReportSpecificationsUPbReferenceMaterials extends ReportSpecificati
{"8-corr", "206Pb", "/238U", "const delta%", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corrPrimary calib const. delta%", "",
"", "true", "true", "3", "true", "", "false", "false"
},
{"", "Uncorr", "Pb/U", "const", "", "getTaskExpressionsEvaluationsPerSpotByField", "UncorrPb/Uconst", "PCT",
"", "true", "false", "3", "true", "232/238 ratio", "false", "false"
}

};
{"", "", "UncorrPb", "/Uconst", "", "getTaskExpressionsEvaluationsPerSpotByField", SQUID_PRIMARY_UTH_EQN_NAME_U, "PCT",
"", "true", "false", "6", "true", "", "false", "false"
},
{"", "", "UncorrPb", "/Thconst", "", "getTaskExpressionsEvaluationsPerSpotByField", SQUID_PRIMARY_UTH_EQN_NAME_TH, "PCT",
"", "true", "false", "6", "true", "", "false", "false"
},};
// Report column order =
// displayName1, displayName2, displayName3, displayName4, units, retrieveMethodName, retrieveParameterName, uncertaintyType,
// footnoteSpec, visible, useArbitrary? for value, digitcount value, unct visible (if required), description where needed,
Expand All @@ -98,46 +97,45 @@ public class ReportSpecificationsUPbReferenceMaterials extends ReportSpecificati
{"4-corr", "206Pb", "/238U", "calCon", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 206Pb/238Ucalibr.const", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"4-corr", "206Pb", "/238U", "Age", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 206Pb/238U Age", "ABS",
"", "true", "false", "4", "true", "", "false", "false"
},
{"4-corr", "208Pb", "/232Th", "calCon", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 208Pb/232Thcalibr.const", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "", "Age", "", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 206Pb/238U Age", "ABS",
"", "true", "true", "0", "true", "", "false", "false"
{"4-corr", "208Pb", "/232Th", "Age", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 208Pb/232Th Age", "ABS",
"", "true", "false", "4", "true", "", "false", "false"
},
{"4-corr", "Total", "206Pb", "/238U", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corrTotal 206Pb/238U", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"4-corr", "Total", "208Pb", "/232Th", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corrTotal 208Pb/232Th", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "4-corr", "%com", "206", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr %com206", "",
"", "true", "false", "3", "", "", "false", "false"
},
{"", "4-corr", "208Pb*", "/206Pb*", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr208Pb*/206Pb*", "",
"", "true", "false", "4", "", "", "false", "false"
},
{"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr208Pb*/206Pb* %err", "",
{"", "4-corr", "%com", "208", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr %com208", "",
"", "true", "false", "3", "", "", "false", "false"
},
{"4-corr", "207Pb", "206Pb", "age","Ma", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr207Pb/206Pbage", "ABS",
},
{"", "4-corr", "208Pb*", "/206Pb*", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr208Pb*/206Pb*", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"4-corr", "207Pb", "206Pb", "age", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr207Pb/206Pbage", "ABS",
"", "true", "false", "3", "true", "", "false", "false"
},
{"", "4-corr", "207Pb", "/206Pb", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 207Pb/206Pb", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
// {"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr207Pb/206Pb%err", "",
// "", "true", "false", "3", "", "", "false", "false"
// },
{"", "4-corr", "207Pb", "/235U", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 207Pb/235U", "PCT",
{"", "4-corr", "207Pb", "/235U", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 207*/235", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
// {"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr207Pb/235U %err", "",
// "", "true", "false", "3", "", "", "false", "false"
// },
{"", "4-corr", "206Pb", "/238U", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 206Pb/238U", "PCT",
{"", "4-corr", "206Pb", "/238U", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr 206*/238", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
// {"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr206Pb/238U %err", "",
// "", "true", "false", "3", "", "", "false", "false"
// },
{"", "4-corr", "err", "corr", "", "getTaskExpressionsEvaluationsPerSpotByField", "4-corr-errcorr", "",
"", "true", "false", "3", "", "", "false", "false"
}

};
// Report column order =
// displayName1, displayName2, displayName3, displayName4, units, retrieveMethodName, retrieveParameterName, uncertaintyType,
Expand All @@ -150,24 +148,36 @@ public class ReportSpecificationsUPbReferenceMaterials extends ReportSpecificati
{"7-corr", "206Pb", "/238U", "calCon", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr 206Pb/238Ucalibr.const", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"7-corr", "206Pb", "/238U", "Age", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr 206Pb/238U Age", "ABS",
"", "true", "false", "4", "true", "", "false", "false"
},
{"7-corr", "208Pb", "/232Th", "calCon", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr 208Pb/232Thcalibr.const", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
}, {"", "", "Age", "", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr 206Pb/238U Age", "ABS",
"", "true", "true", "0", "true", "", "false", "false"
},
// {"", "", "\u00B11\u03C3", "", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr206Pb/238U Age 1sigma", "",
// "", "true", "true", "0", "", "", "false", "false"
// },
{"7-corr", "208Pb", "/232Th", "Age", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr 208Pb/232Th Age", "ABS",
"", "true", "false", "4", "true", "", "false", "false"
},
{"7-corr", "Total", "206Pb", "/238U", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corrTotal 206Pb/238U", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"7-corr", "Total", "208Pb", "/232Th", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corrTotal 208Pb/232Th", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "7-corr", "%com", "206", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr %com206", "",
"", "true", "false", "3", "", "", "false", "false"
},
{"", "7-corr", "%com", "208", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr %com208", "",
"", "true", "false", "3", "", "", "false", "false"
},
{"", "7-corr", "208Pb*", "/206Pb*", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr208Pb*/206Pb*", "",
"", "true", "false", "4", "", "", "false", "false"
},
{"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr208Pb*/206Pb* %err", "",
"", "true", "false", "3", "", "", "false", "false"
},
{"", "7-corr", "206Pb", "/238U", "", "getTaskExpressionsEvaluationsPerSpotByField", "7-corr 206*/238", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
}

};

// Report column order =
Expand All @@ -181,19 +191,30 @@ public class ReportSpecificationsUPbReferenceMaterials extends ReportSpecificati
{"8-corr", "206Pb", "/238U", "calCon", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 206Pb/238Ucalibr.const", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
// {"", "", "%", "err", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 206Pb/238Ucalibr.const %err", "",
// "", "true", "false", "2", "", "", "false", "false"
// },
{"", "", "Age", "", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 206Pb/238U Age", "ABS",
"", "true", "true", "0", "true", "", "false", "false"
},
{"", "", "\u00B11\u03C3", "", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr206Pb/238U Age 1sigma", "",
"", "true", "true", "0", "", "", "false", "false"
{"8-corr", "Total", "206Pb", "/238U", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corrTotal 206Pb/238U", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "8-corr", "%com", "206", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr %com206", "",
"", "true", "false", "3", "", "", "false", "false"
},
{"8-corr", "207Pb", "/206Pb", "Age", "Ma", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 207Pb/206Pb Age", "ABS",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "8-corr", "207Pb", "/206Pb", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 207*/206*", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "8-corr", "207Pb", "/235U", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 207*/235", "PCT",
"", "true", "false", "4", "true", "", "false", "false"
},
{"", "8-corr", "206*", "/238", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr 206*/238", "PCT",
"", "true", "false", "6", "true", "", "false", "false"
},
{"", "8-corr", "err", "corr", "", "getTaskExpressionsEvaluationsPerSpotByField", "8-corr-errcorr", "",
"", "true", "false", "3", "", "", "false", "false"
}

};

/**
Expand Down
Loading

0 comments on commit e2c9a1e

Please sign in to comment.