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: 3 additions & 3 deletions laue_portal/components/peakindex_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@
def set_peakindex_form_props(peakindex, read_only=False):
#set_props("dataset", {'value':peakindex.dataset_id, 'readonly':read_only})
set_props("scanNumber", {'value':peakindex.scanNumber, 'readonly':read_only})
set_props("root_path", {'value':peakindex.root_path, 'readonly':True})
set_props("root_path", {'value':peakindex.root_path, 'readonly':read_only})
set_props("data_path", {'value':peakindex.data_path, 'readonly':read_only})
set_props("filenamePrefix", {'value':','.join(peakindex.filenamePrefix), 'readonly':read_only})
set_props("recon_id", {'value':peakindex.recon_id, 'readonly':read_only})
set_props("wirerecon_id", {'value':peakindex.wirerecon_id, 'readonly':read_only})

Expand Down Expand Up @@ -568,8 +570,6 @@ def set_peakindex_form_props(peakindex, read_only=False):
# set_props("peaksearchPath", {'value':peakindex.peaksearchPath, 'readonly':read_only})
# set_props("p2qPath", {'value':peakindex.p2qPath, 'readonly':read_only})
# set_props("indexingPath", {'value':peakindex.indexingPath, 'readonly':read_only})
set_props("data_path", {'value':peakindex.data_path, 'readonly':True})
set_props("filenamePrefix", {'value':','.join(peakindex.filenamePrefix), 'readonly':True})
set_props("outputFolder", {'value':peakindex.outputFolder, 'readonly':read_only})
set_props("geoFile", {'value':peakindex.geoFile, 'readonly':read_only})
set_props("crystFile", {'value':peakindex.crystFile, 'readonly':read_only})
Expand Down
12 changes: 6 additions & 6 deletions laue_portal/components/wire_recon_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@
def set_wire_recon_form_props(wirerecon, read_only=False):
set_props("scanNumber", {'value':wirerecon.scanNumber, 'readonly':read_only})

# File paths
set_props("root_path", {'value':wirerecon.root_path, 'readonly':read_only})
set_props("data_path", {'value':wirerecon.data_path, 'readonly':read_only})
set_props("filenamePrefix", {'value':','.join(wirerecon.filenamePrefix), 'readonly':read_only})

# User text
# set_props("author", {'value':wirerecon.author, 'readonly':read_only})
set_props("notes", {'value':wirerecon.notes, 'readonly':read_only})
Expand All @@ -241,16 +246,11 @@ def set_wire_recon_form_props(wirerecon, read_only=False):
set_props("depth_end", {'value':wirerecon.depth_end, 'readonly':read_only})
set_props("depth_resolution", {'value':wirerecon.depth_resolution, 'readonly':read_only})

# File paths
set_props("root_path", {'value':wirerecon.root_path, 'readonly':read_only}) # 'readonly':True
set_props("data_path", {'value':wirerecon.data_path, 'readonly':read_only}) # 'readonly':True
set_props("filenamePrefix", {'value':','.join(wirerecon.filenamePrefix), 'readonly':read_only}) # 'readonly':True

# Files
set_props("scanPoints", {'value':wirerecon.scanPoints, 'readonly':read_only}) # Range of files field

# Output
set_props("outputFolder", {'value':wirerecon.outputFolder, 'readonly':read_only})

# Additional form fields
set_props("detector", {'value': None, 'readonly':True}) # Default detector number '0 or auto'
set_props("detector", {'value': None, 'readonly':True}) # Default detector number '0 or auto'
6 changes: 5 additions & 1 deletion laue_portal/database/models/calib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contains calibration data for mask reconstructions.
"""
from sqlalchemy.orm import Mapped, mapped_column, relationship
from sqlalchemy import Integer, String, Float, ForeignKey
from sqlalchemy import String, Float, JSON, ForeignKey
from laue_portal.database.base import Base


Expand All @@ -13,6 +13,10 @@ class Calib(Base):
scanNumber: Mapped[int] = mapped_column(ForeignKey("metadata.scanNumber"))
job_id: Mapped[int] = mapped_column(ForeignKey("job.job_id"), unique=True)

filefolder: Mapped[str] = mapped_column(String) # infile
# filenamePrefix: Mapped[str] = mapped_column(String) # infile
filenamePrefix: Mapped[list[str]] = mapped_column(JSON) # infile

author: Mapped[str] = mapped_column(String, nullable=True)
notes: Mapped[str] = mapped_column(String, nullable=True)

Expand Down
8 changes: 6 additions & 2 deletions laue_portal/database/models/peak_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Table of peak indexing parameters and results.
"""
from typing import Optional
from sqlalchemy.orm import Mapped, mapped_column, relationship
from sqlalchemy import Integer, String, Float, Boolean, ForeignKey
from sqlalchemy.orm import Mapped, mapped_column
from sqlalchemy import Integer, String, Float, Boolean, JSON, ForeignKey
from laue_portal.database.base import Base


Expand All @@ -15,6 +15,10 @@ class PeakIndex(Base):
scanNumber: Mapped[int] = mapped_column(ForeignKey("metadata.scanNumber"))
job_id: Mapped[int] = mapped_column(ForeignKey("job.job_id"), unique=True)

filefolder: Mapped[str] = mapped_column(String) # infile
# filenamePrefix: Mapped[str] = mapped_column(String) # infile
filenamePrefix: Mapped[list[str]] = mapped_column(JSON) # infile

author: Mapped[str] = mapped_column(String, nullable=True)
notes: Mapped[str] = mapped_column(String, nullable=True)

Expand Down
6 changes: 5 additions & 1 deletion laue_portal/database/models/wire_recon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Table of wire reconstruction parameters and results.
"""
from sqlalchemy.orm import Mapped, mapped_column, relationship
from sqlalchemy import Integer, String, Float, ForeignKey
from sqlalchemy import Integer, String, Float, JSON, ForeignKey
from laue_portal.database.base import Base


Expand All @@ -15,6 +15,10 @@ class WireRecon(Base):
# calib_id: Mapped[int] = mapped_column(ForeignKey("calib.calib_id"))
job_id: Mapped[int] = mapped_column(ForeignKey("job.job_id"), unique=True)

filefolder: Mapped[str] = mapped_column(String) # infile
# filenamePrefix: Mapped[str] = mapped_column(String) # infile
filenamePrefix: Mapped[list[str]] = mapped_column(JSON) # infile

author: Mapped[str] = mapped_column(String, nullable=True)
notes: Mapped[str] = mapped_column(String, nullable=True)

Expand Down
Loading