Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Reading Eiger images in databroker #290

@gfabbris

Description

@gfabbris

I think I understand the at least part of the problem:

It looks like databroker looked for "t.h5" image in our last test, which is the pre-staging name of the image. I'm a little surprised by this, because I expected that the images name were read after the scan started, but looking into the staging process, it ultimately calls FileStoreBase._generate_resource that adds the "resource_path" into the database.

It turns out that we are adding the pre-staged name into the "resource_path" in our hdf1.stage(). filename is generated in line 110 before we apply the stage signals in line 127. Then this wrong filename is used in line 133. I think we can re-write the staging to be:

def stage(self):

    # Ensure we do not have an old file open.
    set_and_wait(self.capture, 0)

    # Stage signals, which include file name and path,
    # see staging_setup_DM below.
    FileStoreBase.stage(self)

    # Setup the staged file name and path in the database
    filename, read_path, _ = self.make_filename()
    self._fn = template % (read_path, filename)
    self._fp = read_path
    if not self.file_path_exists.get():
        raise IOError(f"Path {self.file_path.get()} does not exist on IOC.")

    self._point_counter = itertools.count()

    # from FileStoreHDF5.stage()
    res_kwargs = {"frame_per_point": self.get_frames_per_point()}
    self._generate_resource(res_kwargs)   

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions