Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion i14/notebooks/xanes_autoprocessing0.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
" reference=\"current\",\n",
" bin_rule=\"sturges\",\n",
" max_fractional_shift=max_fractional_shift,\n",
" brute=False\n",
" brute=brute\n",
" )\n",
" s_element_align.align2D(shifts=shifts)\n",
"elif method == \"fourier\":\n",
Expand Down
3 changes: 1 addition & 2 deletions i14/schema/xanesPointSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"edgeElement": {
"type": "string",
"enum": [
"",
"H",
"He",
"Li",
Expand Down Expand Up @@ -136,7 +135,7 @@
},
"edgeTransition": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
},
"normalise": {
"type": "boolean",
Expand Down
19 changes: 16 additions & 3 deletions i14/schema/xanesSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,35 @@
},
"edgeTransition": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
},
"elementToAlign": {
"$ref": "#/$defs/elements"
},
"transitionToAlign": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
},
"method": {
"type": "string",
"enum": ["mutual", "fourier"],
"title": "Method",
"description": "The method to use for alignment. `mutual` (mutual information) or `fourier` (Fourier correlation)."
},
"max_fractional_shift": {
"type": "number",
"title": "Max Fractional Shift",
"default": 0.2,
"maximum": 1,
"minimum": 0,
"description": "This number is used to define the maximum shift that could be applied to an axis, as a fraction of the size of the axis. Setting it to a higher number results in longer duration of alignment."
},
"brute": {
"type": "boolean",
"title": "Brute",
"default": false,
"description": "To use a brute force method or mutual information."
},
"normalise": {
"type": "boolean",
"title": "Normalise",
Expand All @@ -46,7 +60,6 @@
"elements": {
"type": "string",
"enum": [
"",
"H",
"He",
"Li",
Expand Down
3 changes: 1 addition & 2 deletions i14/schema/xanesSparseSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"edgeElement": {
"type": "string",
"enum": [
"",
"H",
"He",
"Li",
Expand Down Expand Up @@ -145,7 +144,7 @@
},
"edgeTransition": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
}
},
"required": ["outputFolder", "multiScan", "edgeElement", "edgeTransition"]
Expand Down
31 changes: 30 additions & 1 deletion i14/schema/xanesUISchema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"type": "VerticalLayout",
"options": {
"formWidth": "80%"
},
"elements": [
{
"type": "Control",
Expand Down Expand Up @@ -29,7 +32,29 @@
},
{
"type": "Control",
"scope": "#/properties/normalise"
"scope": "#/properties/brute",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/method",
"schema": {
"const": "mutual"
}
}
}
},
{
"type": "Control",
"scope": "#/properties/max_fractional_shift",
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/brute",
"schema": {
"const": true
}
}
}
}
]
},
Expand Down Expand Up @@ -59,6 +84,10 @@
}
]
},
{
"type": "Control",
"scope": "#/properties/normalise"
},
{
"type": "Control",
"scope": "#/properties/outputFolder"
Expand Down
5 changes: 2 additions & 3 deletions i14/schema/xrfTomoSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"edgeTransition": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
}
}
}
Expand All @@ -36,7 +36,7 @@
},
"transitionToAlign": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
},
"alignmentSection": {
"type": "string",
Expand Down Expand Up @@ -95,7 +95,6 @@
"elements": {
"type": "string",
"enum": [
"",
"H",
"He",
"Li",
Expand Down
13 changes: 12 additions & 1 deletion i14/templates/xanes-auto-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ spec:
value: None
- name: transitionToAlign
value: None
- name: max_fractional_shift
value: 0.2
- name: brute
value: false
- name: normalise
value: true
volumeClaimTemplates:
Expand Down Expand Up @@ -89,6 +93,10 @@ spec:
value: "{{`{{ workflow.parameters.edgeElement }}`}}-{{`{{ workflow.parameters.edgeTransition }}`}}"
- name: elementToAlign
value: "{{`{{ steps.gen-element-to-align.outputs.result }}`}}"
- name: max_fractional_shift
value: "{{`{{ workflow.parameters.max_fractional_shift }}`}}"
- name: brute
value: "{{`{{ workflow.parameters.brute }}`}}"
- name: method
value: "{{`{{ workflow.parameters.method }}`}}"
- name: normalise
Expand Down Expand Up @@ -117,6 +125,8 @@ spec:
- name: outputFolder
- name: edgeElement
- name: elementToAlign
- name: max_fractional_shift
- name: brute
- name: method
- name: normalise
script:
Expand Down Expand Up @@ -147,7 +157,8 @@ spec:
-p window_width 40 \
-p sztol 0.9 \
-p ref_index None \
-p max_fractional_shift 0.2 \
-p max_fractional_shift "{{`{{ inputs.parameters.max_fractional_shift }}`}}" \
-p brute "{{`{{ inputs.parameters.brute }}`}}" \
-p auto_processing False \
> $OUTPUT/papermill.log 2>&1

Expand Down
3 changes: 1 addition & 2 deletions nxstacker/schema/nxstackerSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
"element": {
"type": "string",
"enum": [
"",
"H",
"He",
"Li",
Expand Down Expand Up @@ -251,7 +250,7 @@
},
"transition": {
"type": "string",
"enum": ["", "Ka", "Kb", "La", "Lb", "M"]
"enum": ["Ka", "Kb", "La", "Lb", "M"]
}
}
},
Expand Down
Loading