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
6 changes: 2 additions & 4 deletions src/murfey/client/contexts/spa_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ def post_transfer(
return
dcg_tag = str(dcg_images_dirs[-1])
dcg_data = {
"experiment_type": "single particle",
"experiment_type_id": 37,
"experiment_type_id": 37, # Single particle
"tag": dcg_tag,
"atlas": str(
_atlas_destination(
Expand Down Expand Up @@ -248,8 +247,7 @@ def post_transfer(
return
dcg_tag = str(dcg_images_dirs[-1])
dcg_data = {
"experiment_type": "single particle",
"experiment_type_id": 37,
"experiment_type_id": 37, # Single particle
"tag": dcg_tag,
}
capture_post(
Expand Down
3 changes: 1 addition & 2 deletions src/murfey/client/contexts/tomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def register_tomography_data_collections(
return
try:
dcg_data = {
"experiment_type": "tomo",
"experiment_type_id": 36,
"experiment_type_id": 36, # Tomo
"tag": str(self._basepath),
"atlas": "",
"sample": None,
Expand Down
6 changes: 2 additions & 4 deletions src/murfey/client/contexts/tomo_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ def ensure_dcg_exists(
return None
dcg_tag = str(source).replace(f"/{environment.visit}", "")
dcg_data = {
"experiment_type": "tomo",
"experiment_type_id": 36,
"experiment_type_id": 36, # Tomo
"tag": dcg_tag,
}
capture_post(
Expand Down Expand Up @@ -107,8 +106,7 @@ def post_transfer(
p for p in transferred_file.parent.parts if p != environment.visit
).replace("//", "/")
dcg_data = {
"experiment_type": "tomo",
"experiment_type_id": 36,
"experiment_type_id": 36, # Tomo
"tag": dcg_tag,
"atlas": str(
_atlas_destination(
Expand Down
3 changes: 1 addition & 2 deletions src/murfey/client/multigrid_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,7 @@ def _start_dc(self, metadata_json, from_form: bool = False):

elif isinstance(context, SPAModularContext):
dcg_data = {
"experiment_type": "single particle",
"experiment_type_id": 37,
"experiment_type_id": 37, # Single particle
"tag": str(source),
"atlas": (
str(self._environment.samples[source].atlas)
Expand Down
3 changes: 1 addition & 2 deletions src/murfey/client/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,7 @@ def _start_dc(self, metadata_json, from_form: bool = False):
log.info("Tomography processing flushed")
elif isinstance(context, SPAModularContext):
dcg_data = {
"experiment_type": "single particle",
"experiment_type_id": 37,
"experiment_type_id": 37, # Single particle
"tag": str(source),
"atlas": (
str(self._environment.samples[source].atlas)
Expand Down
2 changes: 0 additions & 2 deletions src/murfey/server/api/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@

class DCGroupParameters(BaseModel):
# DC = Data collection
experiment_type: str
experiment_type_id: int
tag: str
atlas: str = ""
Expand Down Expand Up @@ -159,7 +158,6 @@ def register_dc_group(
else:
dcg_parameters = {
"start_time": str(datetime.now()),
"experiment_type": dcg_params.experiment_type,
"experiment_type_id": dcg_params.experiment_type_id,
"tag": dcg_params.tag,
"session_id": session_id,
Expand Down
3 changes: 1 addition & 2 deletions src/murfey/workflows/clem/register_preprocessing_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ def _register_dcg_and_atlas(
"visit_number": visit_number,
"session_id": session_id,
"tag": dcg_name,
"experiment_type": "experiment",
"experiment_type_id": None,
"experiment_type_id": 45,
"atlas": atlas_name,
"atlas_pixel_size": atlas_pixel_size,
"sample": None,
Expand Down
1 change: 0 additions & 1 deletion src/murfey/workflows/register_data_collection_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def run(
else:
record = ISPyBDB.DataCollectionGroup(
sessionId=ispyb_session_id,
experimentType=message["experiment_type"],
experimentTypeId=message["experiment_type_id"],
)

Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class ISPyBTableValues:
"Tomography": 36,
"Single Particle": 37,
"Atlas": 44,
"CLEM": 45,
"FIB": 46,
}


Expand Down
1 change: 0 additions & 1 deletion tests/workflows/test_register_data_collection_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def test_run(
"visit_number": ExampleVisit.visit_number,
"session_id": ExampleVisit.murfey_session_id,
"tag": "some_text",
"experiment_type": "single particle",
"experiment_type_id": 0,
"atlas": "some_file",
"atlas_pixel_size": 1e-9,
Expand Down
Loading