Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Button, Typography } from "@mui/material";
import { Option, Technique } from "../../types";
import OptionSelect from "../OptionSelect";
import { CorSweepParameterConfiguration } from "./TomoParameterConfiguration";
import { PtyrexParameterConfiguration } from "./PtyrexParameterConfiguration";
import { ReactElement, useState } from "react";
import { LoaderProvider } from "../../../../tomography/src/contexts/LoaderContext";
import { SUBMIT_WORKFLOW_TEMPLATE } from "../../../../tomography/src/components/workflows/Submission";
Expand Down Expand Up @@ -68,6 +69,11 @@ export const ParameterConfiguration: React.FC<ParameterConfigurationProps> = ({
[Technique.Dpc]: {},
[Technique.Nbed]: {},
[Technique.Ptycho]: {},
[Technique.Ptyrex]: {
"ptyrex-submission": (
<PtyrexParameterConfiguration setParameters={setTemplateParameters} />
),
},
[Technique.Tomo]: {
"httomo-cor-sweep": (
<LoaderProvider>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { Card, Stack, TextField } from "@mui/material";
import { useEffect, useState } from "react";
import { TemplateComponentProps } from "../../types";

export const PtyrexParameterConfiguration = ({
setParameters,
}: TemplateComponentProps) => {
const [configPath, setConfigPath] = useState<string>("");
const [projectionNumber, setProjectionNumber] = useState<string>("");

useEffect(() => {
setParameters({
config_json: configPath,
scan_number: 398894,
projection_number: projectionNumber,
nprocs: 4,
memory: "32Gi",
});
}, [configPath, projectionNumber]);

return (
<>
<Card
variant="outlined"
sx={{
mb: 2,
p: 2,
border: "1px solid #89987880",
borderRadius: "4px",
}}
>
<Stack direction="column" spacing={1}>
<TextField
label={"Ptyrex config file path"}
value={configPath}
onChange={(e) => setConfigPath(e.target.value)}
/>
<TextField
label={"Projection Number"}
value={projectionNumber}
onChange={(e) => setProjectionNumber(e.target.value)}
/>
</Stack>
</Card>
</>
);
};
5 changes: 5 additions & 0 deletions frontend/unified/src/data/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export const templateOptions: Option[] = [
value: "ptycho-recon",
desc: "simple ptyrex reconstruction",
},
{
label: "ptyrex",
value: "ptyrex-submission",
desc: "simple ptyrex reconstruction",
},
{
label: "ptycho tomography",
value: "ptycho-tomography",
Expand Down
1 change: 1 addition & 0 deletions frontend/unified/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export enum Technique {
Dpc = "Dpc",
Nbed = "Nbed",
Ptycho = "Ptycho",
Ptyrex = "Ptyrex",
Tomo = "Tomo",
Xanes = "Xanes",
Xrd = "Xrd",
Expand Down
Loading