|
13 | 13 | import numpy as np |
14 | 14 | from numpy.lib import recfunctions as rfn |
15 | 15 |
|
16 | | -from mdio.segy.exceptions import GridOverrideIncompatibleError |
17 | 16 | from mdio.segy.exceptions import GridOverrideKeysError |
18 | 17 | from mdio.segy.exceptions import GridOverrideMissingParameterError |
19 | 18 | from mdio.segy.exceptions import GridOverrideUnknownError |
@@ -371,9 +370,6 @@ class DuplicateIndex(GridOverrideCommand): |
371 | 370 |
|
372 | 371 | def validate(self, index_headers: HeaderArray, grid_overrides: dict[str, bool | int]) -> None: |
373 | 372 | """Validate if this transform should run on the type of data.""" |
374 | | - if "CalculateCable" in grid_overrides: |
375 | | - raise GridOverrideIncompatibleError(self.name, "CalculateCable") |
376 | | - |
377 | 373 | if self.required_keys is not None: |
378 | 374 | self.check_required_keys(index_headers) |
379 | 375 | self.check_required_params(grid_overrides) |
@@ -431,9 +427,6 @@ class AutoChannelWrap(GridOverrideCommand): |
431 | 427 |
|
432 | 428 | def validate(self, index_headers: HeaderArray, grid_overrides: dict[str, bool | int]) -> None: |
433 | 429 | """Validate if this transform should run on the type of data.""" |
434 | | - if "CalculateCable" in grid_overrides: |
435 | | - raise GridOverrideIncompatibleError(self.name, "CalculateCable") |
436 | | - |
437 | 430 | self.check_required_keys(index_headers) |
438 | 431 | self.check_required_params(grid_overrides) |
439 | 432 |
|
@@ -463,34 +456,6 @@ def transform( |
463 | 456 | return index_headers |
464 | 457 |
|
465 | 458 |
|
466 | | -class CalculateCable(GridOverrideCommand): |
467 | | - """Calculate cable numbers from unwrapped channels.""" |
468 | | - |
469 | | - required_keys = {"shot_point", "cable", "channel"} |
470 | | - required_parameters = {"ChannelsPerCable"} |
471 | | - |
472 | | - def validate(self, index_headers: HeaderArray, grid_overrides: dict[str, bool | int]) -> None: |
473 | | - """Validate if this transform should run on the type of data.""" |
474 | | - if "AutoChannelWrap" in grid_overrides: |
475 | | - raise GridOverrideIncompatibleError(self.name, "AutoCableChannel") |
476 | | - |
477 | | - self.check_required_keys(index_headers) |
478 | | - self.check_required_params(grid_overrides) |
479 | | - |
480 | | - def transform( |
481 | | - self, |
482 | | - index_headers: HeaderArray, |
483 | | - grid_overrides: dict[str, bool | int], |
484 | | - ) -> NDArray: |
485 | | - """Perform the grid transform.""" |
486 | | - self.validate(index_headers, grid_overrides) |
487 | | - |
488 | | - channels_per_cable = grid_overrides["ChannelsPerCable"] |
489 | | - index_headers["cable"] = (index_headers["channel"] - 1) // channels_per_cable + 1 |
490 | | - |
491 | | - return index_headers |
492 | | - |
493 | | - |
494 | 459 | class AutoShotWrap(GridOverrideCommand): |
495 | 460 | """Automatically determine ShotGun acquisition type.""" |
496 | 461 |
|
@@ -544,7 +509,6 @@ def __init__(self) -> None: |
544 | 509 | self.commands = { |
545 | 510 | "AutoChannelWrap": AutoChannelWrap(), |
546 | 511 | "AutoShotWrap": AutoShotWrap(), |
547 | | - "CalculateCable": CalculateCable(), |
548 | 512 | "NonBinned": NonBinned(), |
549 | 513 | "HasDuplicates": DuplicateIndex(), |
550 | 514 | } |
|
0 commit comments