Skip to content

Commit

Permalink
Add additional fields : flux, axis, resolution, transmission, experim…
Browse files Browse the repository at this point in the history
…ent_type
  • Loading branch information
iamvigneshwars committed May 17, 2024
1 parent 79ca2a7 commit 0d592a9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
24 changes: 24 additions & 0 deletions datasets/src/graphql/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ pub struct DataCollection {
pub image_suffix: Option<String>,
/// Image file extension
pub image_prefix: Option<String>,
/// Axis overlap
pub overlap: Option<f32>,
/// Axis start
pub axis_start: Option<f32>,
/// Axis end
pub axis_end: Option<f32>,
/// Axis range
pub axis_range: Option<f32>,
/// Resolution
pub resolution: Option<f32>,
/// Flux
pub flux: Option<f64>,
/// Transmission
pub transmission: Option<f32>,
/// Type of experiment
pub experiment_type: Option<String>,
}

/// Extended subraph from session service/subgraph
Expand Down Expand Up @@ -71,6 +87,14 @@ impl From<data_collection::Model> for DataCollection {
image_directory: values.image_directory,
image_suffix: values.image_suffix,
image_prefix: values.image_prefix,
overlap: values.overlap,
axis_start: values.axis_start,
axis_end: values.axis_end,
axis_range: values.axis_range,
resolution: values.resolution,
flux: values.flux,
transmission: values.transmission,
experiment_type: values.experimenttype,
}
}
}
9 changes: 9 additions & 0 deletions models/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ struct Table<'a> {
const TABLES_SPECS: &[&Table] = &[&Table {
name: "DataCollection",
columns: &[
"axisStart",
"axisEnd",
"axisRange",
"dataCollectionId",
"SESSIONID",
"dataCollectionGroupId",
"wavelength",
"exposureTime",
"flux",
"imageDirectory",
"imageSuffix",
"imagePrefix",
Expand All @@ -32,12 +36,17 @@ const TABLES_SPECS: &[&Table] = &[&Table {
"processedDataFile",
"xBeam",
"yBeam",
"resolution",
"resolution",
"experimenttype",
"overlap",
"detectorDistance",
"beamSizeAtSampleX",
"beamSizeAtSampleY",
"detectorId",
"startTime",
"endTime",
"transmission",
],
}];

Expand Down

0 comments on commit 0d592a9

Please sign in to comment.