Skip to content

Commit

Permalink
rename I24 to i24 (#142)
Browse files Browse the repository at this point in the history
* rename I24 to i24

* rename I24 to i24 in file paths

* change det motion device
  • Loading branch information
dperl-dls authored Aug 7, 2024
1 parent 0f5870c commit 5fc1927
Show file tree
Hide file tree
Showing 74 changed files with 225 additions and 225 deletions.
2 changes: 1 addition & 1 deletion deploy/deploy_edm_for_ssx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mkdir $ex_edm
mkdir $ft_edm

scripts_placeholder="SCRIPTS_LOCATION"
scripts_loc="$base/src/mx_bluesky/I24/serial"
scripts_loc="$base/src/mx_bluesky/i24/serial"

# Add blueapi configuration file to get stomp
# See https://github.com/DiamondLightSource/blueapi/issues/485
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ point to the current visit and then running the command:

.. code:: bash
./path/to/mx_bluesky/src/mx_bluesky/I24/serial/set_visit_directory.sh
./path/to/mx_bluesky/src/mx_bluesky/i24/serial/set_visit_directory.sh
Note that the default experiment type for the script setting the
directory will be ``fixed-target``. In case of an extruder collection,
Expand All @@ -46,5 +46,5 @@ the command line.

.. code:: bash
./path/to/mx_bluesky/src/mx_bluesky/I24/serial/set_visit_directory.sh extruder
./path/to/mx_bluesky/src/mx_bluesky/i24/serial/set_visit_directory.sh extruder
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A couple of entry points have been set up so that:

Before opening the experiment specific edm, each of these entry points
will start a ``BlueAPI`` server. The configuration used by ``BlueAPI``
is saved in ``src/mx_bluesky/I24/serial/blueapi_config.yaml``.
is saved in ``src/mx_bluesky/i24/serial/blueapi_config.yaml``.

Detector choice
===============
Expand Down Expand Up @@ -75,7 +75,7 @@ set up the coordinate system.

Before this step remember to reset the scale and skew factors as well as
the motor directions as needed. Current values are saved in
``src/mx_bluesky/I24/serial/parameters/fixed_target`` in the
``src/mx_bluesky/i24/serial/parameters/fixed_target`` in the
``cs_maker.json`` and ``motor_direction.txt`` files.

1. From the main edm screen open the ``viewer`` and ``moveonclick``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ Theory for this computation

The plan needs information stored in a few files:

* The motor directions are stored in ``src/mx_bluesky/I24/serial/parameters/fixed_target/cs/motor_directions.txt.`` The motor number multiplied by the motor direction should give the positive chip direction.
* The scale values for x,y,z, the skew value and the sign of Sx, Sy, Sz are all stored in ``src/mx_bluesky/I24/serial/parameters/fixed_target/cs/cs_maker.json``
* The motor directions are stored in ``src/mx_bluesky/i24/serial/parameters/fixed_target/cs/motor_directions.txt.`` The motor number multiplied by the motor direction should give the positive chip direction.
* The scale values for x,y,z, the skew value and the sign of Sx, Sy, Sz are all stored in ``src/mx_bluesky/i24/serial/parameters/fixed_target/cs/cs_maker.json``
* The fiducials 1 and 2 positions are written to file when selecting the fiducials (Setting fiducial 0 instead sends a homing command directly to the pmac_string PV)

NOTE. The ``motor_direction.txt`` and ``cs_maker.json`` files should
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
"requests",
"opencv-python",
"pydantic",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@main",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@7e01eeaf18046eadf4d513c79b06e0a11d616776",
"fastapi[all]<0.99",
"blueapi @ git+https://github.com/DiamondLightSource/blueapi.git@main",
]
Expand Down Expand Up @@ -51,8 +51,8 @@ dev = [

[project.scripts]
mx_bluesky = "mx_bluesky.__main__:main"
run_extruder = "mx_bluesky.I24.serial.run_serial:run_extruder"
run_fixed_target = "mx_bluesky.I24.serial.run_serial:run_fixed_target"
run_extruder = "mx_bluesky.i24.serial.run_serial:run_extruder"
run_fixed_target = "mx_bluesky.i24.serial.run_serial:run_fixed_target"

[project.urls]
GitHub = "https://github.com/DiamondLightSource/mx_bluesky"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ env:
- kind: dodal
module: dodal.beamlines.i24
- kind: planFunctions
module: mx_bluesky.I24.serial
module: mx_bluesky.i24.serial
events:
broadcast_status_events: False
api:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import requests

from mx_bluesky.I24.serial.parameters import SSXType
from mx_bluesky.I24.serial.setup_beamline import (
from mx_bluesky.i24.serial.parameters import SSXType
from mx_bluesky.i24.serial.setup_beamline import (
Detector,
Eiger,
Pilatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
from dodal.devices.i24.beamstop import Beamstop
from dodal.devices.i24.dcm import DCM
from dodal.devices.i24.dual_backlight import DualBacklight
from dodal.devices.i24.I24_detector_motion import DetectorMotion
from dodal.devices.i24.i24_detector_motion import DetectorMotion
from dodal.devices.zebra import DISCONNECT, SOFT_IN3, Zebra

from mx_bluesky.I24.serial import log
from mx_bluesky.I24.serial.dcid import DCID
from mx_bluesky.I24.serial.parameters import ExtruderParameters, SSXType
from mx_bluesky.I24.serial.parameters.constants import PARAM_FILE_NAME, PARAM_FILE_PATH
from mx_bluesky.I24.serial.setup_beamline import Pilatus, caget, caput, pv
from mx_bluesky.I24.serial.setup_beamline import setup_beamline as sup
from mx_bluesky.I24.serial.setup_beamline.setup_detector import (
from mx_bluesky.i24.serial import log
from mx_bluesky.i24.serial.dcid import DCID
from mx_bluesky.i24.serial.parameters import ExtruderParameters, SSXType
from mx_bluesky.i24.serial.parameters.constants import PARAM_FILE_NAME, PARAM_FILE_PATH
from mx_bluesky.i24.serial.setup_beamline import Pilatus, caget, caput, pv
from mx_bluesky.i24.serial.setup_beamline import setup_beamline as sup
from mx_bluesky.i24.serial.setup_beamline.setup_detector import (
UnknownDetectorType,
get_detector_type,
)
from mx_bluesky.I24.serial.setup_beamline.setup_zebra_plans import (
from mx_bluesky.i24.serial.setup_beamline.setup_zebra_plans import (
GATE_START,
TTL_EIGER,
TTL_PILATUS,
Expand All @@ -49,7 +49,7 @@
setup_zebra_for_extruder_with_pump_probe_plan,
setup_zebra_for_quickshot_plan,
)
from mx_bluesky.I24.serial.write_nexus import call_nexgen
from mx_bluesky.i24.serial.write_nexus import call_nexgen

usage = "%(prog)s command [options]"
logger = logging.getLogger("I24ssx.extruder")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@
from dodal.devices.i24.beamstop import Beamstop
from dodal.devices.i24.dcm import DCM
from dodal.devices.i24.dual_backlight import DualBacklight
from dodal.devices.i24.I24_detector_motion import DetectorMotion
from dodal.devices.i24.i24_detector_motion import DetectorMotion
from dodal.devices.i24.pmac import PMAC
from dodal.devices.zebra import Zebra

from mx_bluesky.I24.serial import log
from mx_bluesky.I24.serial.dcid import DCID
from mx_bluesky.I24.serial.fixed_target.ft_utils import (
from mx_bluesky.i24.serial import log
from mx_bluesky.i24.serial.dcid import DCID
from mx_bluesky.i24.serial.fixed_target.ft_utils import (
ChipType,
MappingType,
PumpProbeSetting,
)
from mx_bluesky.I24.serial.parameters import (
from mx_bluesky.i24.serial.parameters import (
ChipDescription,
FixedTargetParameters,
SSXType,
)
from mx_bluesky.I24.serial.parameters.constants import (
from mx_bluesky.i24.serial.parameters.constants import (
LITEMAP_PATH,
PARAM_FILE_NAME,
PARAM_FILE_PATH_FT,
)
from mx_bluesky.I24.serial.setup_beamline import caget, cagetstring, caput, pv
from mx_bluesky.I24.serial.setup_beamline import setup_beamline as sup
from mx_bluesky.I24.serial.setup_beamline.setup_zebra_plans import (
from mx_bluesky.i24.serial.setup_beamline import caget, cagetstring, caput, pv
from mx_bluesky.i24.serial.setup_beamline import setup_beamline as sup
from mx_bluesky.i24.serial.setup_beamline.setup_zebra_plans import (
SHUTTER_OPEN_TIME,
arm_zebra,
close_fast_shutter,
Expand All @@ -52,7 +52,7 @@
reset_zebra_when_collection_done_plan,
setup_zebra_for_fastchip_plan,
)
from mx_bluesky.I24.serial.write_nexus import call_nexgen
from mx_bluesky.i24.serial.write_nexus import call_nexgen

ABORTED = False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@
from dodal.common import inject
from dodal.devices.i24.beamstop import Beamstop, BeamstopPositions
from dodal.devices.i24.dual_backlight import BacklightPositions, DualBacklight
from dodal.devices.i24.I24_detector_motion import DetectorMotion
from dodal.devices.i24.i24_detector_motion import DetectorMotion
from dodal.devices.i24.pmac import PMAC, EncReset, LaserSettings

from mx_bluesky.I24.serial import log
from mx_bluesky.I24.serial.fixed_target import i24ssx_Chip_Mapping_py3v1 as mapping
from mx_bluesky.I24.serial.fixed_target import i24ssx_Chip_StartUp_py3v1 as startup
from mx_bluesky.I24.serial.fixed_target.ft_utils import (
from mx_bluesky.i24.serial import log
from mx_bluesky.i24.serial.fixed_target import i24ssx_Chip_Mapping_py3v1 as mapping
from mx_bluesky.i24.serial.fixed_target import i24ssx_Chip_StartUp_py3v1 as startup
from mx_bluesky.i24.serial.fixed_target.ft_utils import (
ChipType,
Fiducials,
MappingType,
)
from mx_bluesky.I24.serial.parameters import get_chip_format
from mx_bluesky.I24.serial.parameters.constants import (
from mx_bluesky.i24.serial.parameters import get_chip_format
from mx_bluesky.i24.serial.parameters.constants import (
CS_FILES_PATH,
FULLMAP_PATH,
LITEMAP_PATH,
PARAM_FILE_NAME,
PARAM_FILE_PATH_FT,
PVAR_FILE_PATH,
)
from mx_bluesky.I24.serial.setup_beamline import Pilatus, caget, caput, pv
from mx_bluesky.I24.serial.setup_beamline.setup_detector import get_detector_type
from mx_bluesky.i24.serial.setup_beamline import Pilatus, caget, caput, pv
from mx_bluesky.i24.serial.setup_beamline.setup_detector import get_detector_type

logger = logging.getLogger("I24ssx.chip_manager")

Expand Down Expand Up @@ -772,7 +772,7 @@ def cs_maker(pmac: PMAC = inject("pmac")) -> MsgGenerator:
Values for scalex, scaley, scalez, and skew, as well as the sign of
Sx, Sy, Sz are stored in a .json file and should be modified there.
Location of file: src/mx_bluesky/I24/serial/parameters/cs_maker.json
Location of file: src/mx_bluesky/i24/serial/parameters/cs_maker.json
Theory
Rx: rotation about X-axis, pitch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
import numpy as np
from matplotlib import pyplot as plt

from mx_bluesky.I24.serial import log
from mx_bluesky.I24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.I24.serial.fixed_target.i24ssx_Chip_StartUp_py3v1 import (
from mx_bluesky.i24.serial import log
from mx_bluesky.i24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.i24.serial.fixed_target.i24ssx_Chip_StartUp_py3v1 import (
check_files,
get_shot_order,
get_xy,
read_parameter_file,
write_file,
)
from mx_bluesky.I24.serial.parameters import get_chip_format
from mx_bluesky.I24.serial.parameters.constants import PARAM_FILE_PATH_FT
from mx_bluesky.i24.serial.parameters import get_chip_format
from mx_bluesky.i24.serial.parameters.constants import PARAM_FILE_PATH_FT

logger = logging.getLogger("I24ssx.chip_mapping")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

import numpy as np

from mx_bluesky.I24.serial import log
from mx_bluesky.I24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.I24.serial.parameters import FixedTargetParameters, get_chip_format
from mx_bluesky.I24.serial.parameters.constants import (
from mx_bluesky.i24.serial import log
from mx_bluesky.i24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.i24.serial.parameters import FixedTargetParameters, get_chip_format
from mx_bluesky.i24.serial.parameters.constants import (
HEADER_FILES_PATH,
PARAM_FILE_NAME,
PARAM_FILE_PATH_FT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from dodal.devices.i24.pmac import PMAC
from dodal.devices.oav.oav_detector import OAV

from mx_bluesky.I24.serial.fixed_target import i24ssx_Chip_Manager_py3v1 as manager
from mx_bluesky.I24.serial.fixed_target.ft_utils import Fiducials
from mx_bluesky.I24.serial.parameters.constants import OAV1_CAM
from mx_bluesky.i24.serial.fixed_target import i24ssx_Chip_Manager_py3v1 as manager
from mx_bluesky.i24.serial.fixed_target.ft_utils import Fiducials
from mx_bluesky.i24.serial.parameters.constants import OAV1_CAM

logger = logging.getLogger("I24ssx.moveonclick")

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from mx_bluesky.I24.serial.parameters.constants import SSXType
from mx_bluesky.I24.serial.parameters.experiment_parameters import (
from mx_bluesky.i24.serial.parameters.constants import SSXType
from mx_bluesky.i24.serial.parameters.experiment_parameters import (
ChipDescription,
ExtruderParameters,
FixedTargetParameters,
)
from mx_bluesky.I24.serial.parameters.utils import get_chip_format
from mx_bluesky.i24.serial.parameters.utils import get_chip_format

__all__ = [
"SSXType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from typing import Optional

from mx_bluesky.I24.serial.log import _read_visit_directory_from_file
from mx_bluesky.i24.serial.log import _read_visit_directory_from_file


class SSXType(Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pydantic import BaseModel, ConfigDict, validator

from mx_bluesky.I24.serial.fixed_target.ft_utils import (
from mx_bluesky.i24.serial.fixed_target.ft_utils import (
ChipType,
MappingType,
PumpProbeSetting,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Any, Dict

from mx_bluesky.I24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.I24.serial.parameters.experiment_parameters import ChipDescription
from mx_bluesky.I24.serial.setup_beamline import caget, pv
from mx_bluesky.i24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.i24.serial.parameters.experiment_parameters import ChipDescription
from mx_bluesky.i24.serial.setup_beamline import caget, pv


def get_chip_format(chip_type: ChipType) -> ChipDescription:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from typing import Union

from mx_bluesky.I24.serial.setup_beamline import pv
from mx_bluesky.i24.serial.setup_beamline import pv


class Pilatus:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from dodal.devices.i24.aperture import Aperture, AperturePositions
from dodal.devices.i24.beamstop import Beamstop, BeamstopPositions
from dodal.devices.i24.dual_backlight import BacklightPositions, DualBacklight
from dodal.devices.i24.I24_detector_motion import DetectorMotion
from dodal.devices.i24.i24_detector_motion import DetectorMotion

from mx_bluesky.I24.serial.setup_beamline import pv
from mx_bluesky.I24.serial.setup_beamline.ca import caget, caput
from mx_bluesky.i24.serial.setup_beamline import pv
from mx_bluesky.i24.serial.setup_beamline.ca import caget, caput

logger = logging.getLogger("I24ssx.sup")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
from blueapi.core import MsgGenerator
from bluesky.utils import Msg
from dodal.common import inject
from dodal.devices.i24.I24_detector_motion import DetectorMotion
from dodal.devices.i24.i24_detector_motion import DetectorMotion

from mx_bluesky.I24.serial import log
from mx_bluesky.I24.serial.parameters import SSXType
from mx_bluesky.I24.serial.setup_beamline import pv
from mx_bluesky.I24.serial.setup_beamline.ca import caget
from mx_bluesky.I24.serial.setup_beamline.pv_abstract import (
from mx_bluesky.i24.serial import log
from mx_bluesky.i24.serial.parameters import SSXType
from mx_bluesky.i24.serial.setup_beamline import pv
from mx_bluesky.i24.serial.setup_beamline.ca import caget
from mx_bluesky.i24.serial.setup_beamline.pv_abstract import (
Detector,
Eiger,
Pilatus,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

import requests

from mx_bluesky.I24.serial.fixed_target.ft_utils import ChipType, MappingType
from mx_bluesky.I24.serial.parameters import ExtruderParameters, FixedTargetParameters
from mx_bluesky.I24.serial.setup_beamline import Eiger, caget, cagetstring
from mx_bluesky.i24.serial.fixed_target.ft_utils import ChipType, MappingType
from mx_bluesky.i24.serial.parameters import ExtruderParameters, FixedTargetParameters
from mx_bluesky.i24.serial.setup_beamline import Eiger, caget, cagetstring

logger = logging.getLogger("I24ssx.nexus_writer")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5fc1927

Please sign in to comment.