Skip to content

Introduction of a scannable laser interface#132

Draft
LukePiewalker wants to merge 5 commits into
mainfrom
scannable_laser_interface
Draft

Introduction of a scannable laser interface#132
LukePiewalker wants to merge 5 commits into
mainfrom
scannable_laser_interface

Conversation

@LukePiewalker

Copy link
Copy Markdown
Contributor

Introduction of a scannable laser interface and dummy modules, which mimic the intended functionality.

Description

This interface could be used to access scannable laser within a proper tool-chain for e.g. PLE measurements.
It consists of ScannableLaserInterface and the StabilizationMixin where the Mixin could be used for scannable lasers which have some hardware capability to stabilize themselves.

In order to also incorporate, that some lasers require some working points to be set, which can be either a simple setpoint, such as a motor/grating position, or actively controlled parameters, such as a temperature or current, multiclassing with ProcessSetpointInterface and ProcessControlInterface is used in the respective dummy module.
The ScannableLaserInterface incorporates non-abstract properties, to check if the laser supports the respective features.

Motivation and Context

So far scannable lasers are typically only accessed by the respective interfaces the vendor provides and having them implemented in qudi could enable additional speed up and automization of measurements.

How Has This Been Tested?

No real test but Dummy modules have been introduced.

Types of changes

  • Bug fix
  • New feature
  • Breaking change (Causes existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have documented my changes in /docs/changelog.md.
  • My change requires additional/updated documentation.
  • I have updated the documentation accordingly.
  • I have added/updated the config example for any module docstrings as necessary.
  • I have checked that the change does not contain obvious errors
    (syntax, indentation, mutable default values, etc.).
  • I have tested my changes using 'Load all modules' on the default dummy configuration.
  • All changed Jupyter notebooks have been stripped of their output cells.

@LukePiewalker

Copy link
Copy Markdown
Contributor Author

Dear all
@qku, @ksenkalla, @Nick-Grimm, @Neverhorst

I drafted up something now for the laser scanning interface and wrote (very minimal) dummy modules.
Open for comments and suggestions or criticism.

@qku

qku commented May 17, 2024

Copy link
Copy Markdown
Contributor

Really cool @LukePiewalker ! I like the idea of having the stabilization as a mixin. It should allow us to cover a large variety of lasers.

@dataclass(frozen=True)
class ScannableLaserConstraints:

scan_limits: Tuple[float, float]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use also ScalarConstraint here? This would make things more consistent and it comes with built-in checker methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was originally intending to do so, but then got a bit confused on using two scalar constraints for such a thing with upper and lower limits.

Just went for two floats out of convenience, because I thought its easier for such a simple concept.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would only need a single scalar constraint here though, right? I understand the scan limits as the minimum and maximum value that the scan "position" in terms of scan units can reach. The constraint then includes the two floats for the upper and lower bound.

scan_range: Tuple[float, float]
scan_speed: Union[int, float]
scan_mode: Union[LaserScanMode, int]
initial_scan_direction: Union[LaserScanDirection, int]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I can't think of a situation where this is useful. May just be me though.

@LukePiewalker LukePiewalker Jul 1, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to the initial_scan_direction part only?
One could use that to change the direction during a "running scan" and therefore overscan some sub part multiple times on the fly without needing to change the scan range.
Used it that way in the lab some time already, therefore thought might be helpful.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I guess this is mostly relevant for very slow scans?



@dataclass(frozen=True)
class ScannableLaserSettings:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that introducing a class for the scan settings is of advantage here. Other than in the scanning probe toolchain, we don't need to save the settings together with data, right? I would go with keyword arguments for the various parameters instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was just a fan of having things consistent. Then also one could possibly include some things such as type checking, range clipping etc in the settings class already.

@Neverhorst Neverhorst mentioned this pull request Aug 9, 2024
11 tasks
@Neverhorst Neverhorst mentioned this pull request Nov 6, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants