v1.0.0-rc.99 #4
@@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import { Stack } from '@mui/material';
|
||||
import {Checkbox, FormControlLabel, Stack} from '@mui/material';
|
||||
import _ from 'lodash';
|
||||
import NumberTextField from './NumberTextField';
|
||||
import ButtonWithSnackbar from './ButtonWithSnackbar';
|
||||
@@ -88,6 +88,29 @@ class DarkMaskSettings extends Component<MyProps, MyState> {
|
||||
<strong>Dark data collection settings for mask</strong>
|
||||
<div>(DECTRIS detectors only)</div>
|
||||
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
checked={this.state.s.number_of_frames === 0}
|
||||
onChange={(e) => {
|
||||
const checked = e.target.checked;
|
||||
this.setState((prev) => {
|
||||
const nextFrames = checked
|
||||
? 0
|
||||
: prev.s.number_of_frames === 0
|
||||
? 1000
|
||||
: prev.s.number_of_frames;
|
||||
return {
|
||||
number_of_frames_err: false, // zero-mode has no error
|
||||
s: { ...prev.s, number_of_frames: nextFrames },
|
||||
};
|
||||
});
|
||||
}}
|
||||
/>
|
||||
}
|
||||
label="Enable dark data collection"
|
||||
/>
|
||||
|
||||
<Stack spacing={3} direction="row" sx={{ width: '80%' }}>
|
||||
|
||||
<NumberTextField
|
||||
@@ -122,8 +145,6 @@ class DarkMaskSettings extends Component<MyProps, MyState> {
|
||||
}));
|
||||
}}
|
||||
/>
|
||||
</Stack>
|
||||
<Stack spacing={3} direction="row" sx={{ width: '80%' }}>
|
||||
<NumberTextField
|
||||
start_val={this.state.s.number_of_frames}
|
||||
label={'Number of frames'}
|
||||
@@ -139,6 +160,8 @@ class DarkMaskSettings extends Component<MyProps, MyState> {
|
||||
}}
|
||||
|
||||
/>
|
||||
</Stack>
|
||||
<Stack spacing={3} direction="row" sx={{ width: '80%' }}>
|
||||
<NumberTextField
|
||||
start_val={this.state.s.max_allowed_pixel_count}
|
||||
label={'Max allowed pixel count for valid pixel'}
|
||||
|
||||
Reference in New Issue
Block a user