cleaned up newlines and import order
This commit is contained in:
@@ -4,6 +4,7 @@ from abc import abstractmethod
|
||||
from slic.utils.channels import Channels
|
||||
from slic.utils import can_create_file, typename
|
||||
from slic.core.task import Task
|
||||
|
||||
from .baseacquisition import BaseAcquisition
|
||||
from .sfpaths import SwissFELPaths
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ from bsread.avail import dispatcher
|
||||
from .acquisition import Acquisition
|
||||
|
||||
|
||||
|
||||
class BSAcquisition(Acquisition):
|
||||
|
||||
def _acquire(self, *args, **kwargs):
|
||||
|
||||
@@ -3,7 +3,6 @@ from bsread.avail import dispatcher
|
||||
from slic.utils.printing import format_header
|
||||
|
||||
|
||||
|
||||
class BSChannels:
|
||||
|
||||
def __init__(self, channels):
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import data_api as dapi
|
||||
|
||||
from .acquisition import Acquisition
|
||||
|
||||
|
||||
|
||||
class DBAcquisition(Acquisition):
|
||||
|
||||
def _acquire(self, *args, **kwargs):
|
||||
|
||||
@@ -12,7 +12,6 @@ from .sfpaths import SwissFELPaths
|
||||
from .pedestals import find_last_pedestal, take_pedestal
|
||||
|
||||
|
||||
|
||||
class DIAAcquisition(BaseAcquisition):
|
||||
|
||||
def __init__(self, instrument, pgroup, default_channels=None, default_dir=None, api_address=None):
|
||||
|
||||
@@ -3,14 +3,12 @@ from datetime import datetime
|
||||
from slic.utils.printing import printable_dict_of_dicts
|
||||
|
||||
|
||||
|
||||
EXPTIME = {
|
||||
"alvra": 0.000005,
|
||||
"bernina": 0.00001
|
||||
}
|
||||
|
||||
|
||||
|
||||
class DIAConfig:
|
||||
|
||||
def __init__(self, instrument, pgroup):
|
||||
|
||||
@@ -11,7 +11,6 @@ TIMESTAMP_FORMAT = "%Y%m%d_%H%M"
|
||||
PREFIX = "pedestal_"
|
||||
|
||||
|
||||
|
||||
def find_last_pedestal(clients, directory="."):
|
||||
clients = set(clients)
|
||||
clients = clients - {"bsread"}
|
||||
|
||||
@@ -7,7 +7,6 @@ from slic.utils import get_dtype, get_shape
|
||||
from .acquisition import Acquisition
|
||||
|
||||
|
||||
|
||||
class PVAcquisition(Acquisition):
|
||||
|
||||
def _acquire(self, *args, polling=False, **kwargs):
|
||||
@@ -32,7 +31,6 @@ def epics_to_h5_polling(filename, channels, n_pulses=100, wait_time=0.5):
|
||||
write_to_h5(filename, channels, arrays)
|
||||
|
||||
|
||||
|
||||
def epics_to_h5_triggered(filename, channels, n_pulses=100, wait_time=0.5):
|
||||
pvs = [PV(ch) for ch in channels]
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from time import sleep
|
||||
|
||||
from .baseadjustable import BaseAdjustable
|
||||
|
||||
|
||||
@@ -26,6 +27,7 @@ class GenericAdjustable(BaseAdjustable):
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
pos = 0
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
from abc import abstractmethod
|
||||
from time import sleep
|
||||
|
||||
from .basecondition import BaseCondition
|
||||
from slic.utils import within, within_fraction, fraction_to_percentage
|
||||
from slic.utils import typename
|
||||
|
||||
from .basecondition import BaseCondition
|
||||
|
||||
|
||||
class Condition(BaseCondition):
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from .condition import Condition
|
||||
from slic.core.task import Loop
|
||||
|
||||
from .condition import Condition
|
||||
|
||||
|
||||
class ValueCondition(Condition):
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ EVERYTHING = "*"
|
||||
DIGITS = "[0-9]"
|
||||
|
||||
|
||||
|
||||
class RunFilenameGenerator:
|
||||
|
||||
def __init__(self, base_dir, prefix="run", n_digits=4, separator="_", extension="json"):
|
||||
@@ -38,8 +37,6 @@ class RunFilenameGenerator:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def extract_runnumbers(fnames, *args):
|
||||
return [extract_runnumber(fn, *args) for fn in fnames]
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ from slic.utils.printing import printable_dict
|
||||
from slic.utils.ask_yes_no import ask_Yes_no
|
||||
|
||||
|
||||
|
||||
class ScanBackend:
|
||||
|
||||
def __init__(self, adjustables, values, acquisitions, filename, n_pulses, data_base_dir, scan_info_dir, make_scan_sub_dir, condition):
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import numpy as np
|
||||
|
||||
from slic.devices.general.adjustable import DummyAdjustable
|
||||
from slic.utils import typename
|
||||
|
||||
from .scanbackend import ScanBackend
|
||||
from .runname import RunFilenameGenerator
|
||||
from slic.devices.general.adjustable import DummyAdjustable
|
||||
from slic.utils import typename
|
||||
|
||||
|
||||
def make_positions(start, end, n):
|
||||
return np.linspace(start, end, n + 1)
|
||||
|
||||
|
||||
|
||||
class Scanner:
|
||||
|
||||
def __init__(self, data_base_dir="", scan_info_dir="", default_acquisitions=[], condition=None, make_scan_sub_dir=True):
|
||||
|
||||
@@ -16,6 +16,7 @@ class BaseTask(ABC):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
|
||||
#TODO:
|
||||
#Task is used everywhere with hold=False (default?).
|
||||
#Thus, whether start() is mandatory is not clear.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from threading import Thread
|
||||
|
||||
from .basetask import BaseTask
|
||||
from slic.utils import typename
|
||||
|
||||
from .basetask import BaseTask
|
||||
|
||||
|
||||
class Task(BaseTask):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user