Skip to content

Commit

Permalink
we should not copy-paste code
Browse files Browse the repository at this point in the history
  • Loading branch information
j-zimmermann committed Nov 28, 2024
1 parent 59a5727 commit fda19e8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
18 changes: 6 additions & 12 deletions ossdbs/electrodes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@
from .microelectrode import MicroElectrodeModel, MicroElectrodeParameters
from .neuro_pace import NeuroPaceModel, NeuroPaceParameters
from .pins_medical import PINSMedicalModel, PINSMedicalParameters
from .pmt_seeg import (
PMTsEEGModel,
PMTsEEGParameters,
)

ELECTRODES = {
"AbbottStJudeActiveTip6142_6145": AbbottStJudeActiveTip6142_6145,
Expand Down Expand Up @@ -130,11 +126,11 @@
"DixiSEEG12Custom": DixiSEEGModel,
"DixiSEEG15Custom": DixiSEEGModel,
"DixiSEEG18Custom": DixiSEEGModel,
"PMTsEEG2102_08Custom": PMTsEEGModel,
"PMTsEEG2102_10Custom": PMTsEEGModel,
"PMTsEEG2102_12Custom": PMTsEEGModel,
"PMTsEEG2102_14Custom": PMTsEEGModel,
"PMTsEEG2102_16Custom": PMTsEEGModel,
"PMTsEEG2102_08Custom": DixiSEEGModel,
"PMTsEEG2102_10Custom": DixiSEEGModel,
"PMTsEEG2102_12Custom": DixiSEEGModel,
"PMTsEEG2102_14Custom": DixiSEEGModel,
"PMTsEEG2102_16Custom": DixiSEEGModel,
"Medtronic3387Custom": MedtronicModel,
"Medtronic3389Custom": MedtronicModel,
"Medtronic3391Custom": MedtronicModel,
Expand All @@ -159,7 +155,7 @@
"BostonScientificCartesiaXModel": BostonScientificCartesiaParameters,
"BostonScientificCartesiaHXModel": BostonScientificCartesiaParameters,
"DixiSEEGModel": DixiSEEGParameters,
"PMTsEEGModel": PMTsEEGParameters,
"PMTsEEGModel": DixiSEEGParameters,
"MedtronicModel": MedtronicParameters,
"MedtronicSenSightModel": MedtronicParameters,
"MicroElectrodeModel": MicroElectrodeParameters,
Expand Down Expand Up @@ -203,8 +199,6 @@
"PMTsEEG2102_12",
"PMTsEEG2102_14",
"PMTsEEG2102_16",
"PMTsEEGModel",
"PMTsEEGParameters",
"Medtronic3387",
"Medtronic3389",
"Medtronic3391",
Expand Down
24 changes: 10 additions & 14 deletions ossdbs/electrodes/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
PINSMedicalModel,
PINSMedicalParameters,
)
from .pmt_seeg import (
PMTsEEGModel,
PMTsEEGParameters,
)

default_electrode_parameters = {
"AbbottStJudeActiveTip6146_6149": AbbottStJudeActiveTipParameters(
Expand Down Expand Up @@ -252,39 +248,39 @@
total_length=400.0,
n_contacts=18,
),
"PMTsEEG2102_08": PMTsEEGParameters(
"PMTsEEG2102_08": DixiSEEGParameters(
tip_length=0.8,
contact_length=2.0,
contact_spacing=2.0,
lead_diameter=0.8,
total_length=400.0,
n_contacts=8,
),
"PMTsEEG2102_10": PMTsEEGParameters(
"PMTsEEG2102_10": DixiSEEGParameters(
tip_length=0.8,
contact_length=2.0,
contact_spacing=2.0,
lead_diameter=0.8,
total_length=400.0,
n_contacts=10,
),
"PMTsEEG2102_12": PMTsEEGParameters(
"PMTsEEG2102_12": DixiSEEGParameters(
tip_length=0.8,
contact_length=2.0,
contact_spacing=2.0,
lead_diameter=0.8,
total_length=400.0,
n_contacts=12,
),
"PMTsEEG2102_14": PMTsEEGParameters(
"PMTsEEG2102_14": DixiSEEGParameters(
tip_length=0.8,
contact_length=2.0,
contact_spacing=2.0,
lead_diameter=0.8,
total_length=400.0,
n_contacts=14,
),
"PMTsEEG2102_16": PMTsEEGParameters(
"PMTsEEG2102_16": DixiSEEGParameters(
tip_length=0.8,
contact_length=2.0,
contact_spacing=2.0,
Expand Down Expand Up @@ -518,36 +514,36 @@ def PMTsEEG2102_08(
):
"""PMTsEEG2102_08 electrode."""
parameters = default_electrode_parameters["PMTsEEG2102_08"]
return PMTsEEGModel(parameters, rotation, direction, position)
return DixiSEEGModel(parameters, rotation, direction, position)


def PMTsEEG2102_10(
rotation: float = 0, direction: tuple = (0, 0, 1), position: tuple = (0, 0, 0)
):
"""PMTsEEG2102_10 electrode."""
parameters = default_electrode_parameters["PMTsEEG2102_10"]
return PMTsEEGModel(parameters, rotation, direction, position)
return DixiSEEGModel(parameters, rotation, direction, position)


def PMTsEEG2102_12(
rotation: float = 0, direction: tuple = (0, 0, 1), position: tuple = (0, 0, 0)
):
"""PMTsEEG2102_12 electrode."""
parameters = default_electrode_parameters["PMTsEEG2102_12"]
return PMTsEEGModel(parameters, rotation, direction, position)
return DixiSEEGModel(parameters, rotation, direction, position)


def PMTsEEG2102_14(
rotation: float = 0, direction: tuple = (0, 0, 1), position: tuple = (0, 0, 0)
):
"""PMTsEEG2102_14 electrode."""
parameters = default_electrode_parameters["PMTsEEG2102_14"]
return PMTsEEGModel(parameters, rotation, direction, position)
return DixiSEEGModel(parameters, rotation, direction, position)


def PMTsEEG2102_16(
rotation: float = 0, direction: tuple = (0, 0, 1), position: tuple = (0, 0, 0)
):
"""PMTsEEG2102_16 electrode."""
parameters = default_electrode_parameters["PMTsEEG2102_16"]
return PMTsEEGModel(parameters, rotation, direction, position)
return DixiSEEGModel(parameters, rotation, direction, position)

0 comments on commit fda19e8

Please sign in to comment.