Skip to content

Speed up creation of segmented mirror in simulators #160

@ivalaginja

Description

@ivalaginja

Theh create_segmented_mirror() method in the SegmentedTelescope class takes an awful lot of time and scales with the number of segments:

def create_segmented_mirror(self, n_zernikes):

The current bottleneck is the extention of the mode basis by each new segment. Scipy interprets the transformation matrices in my bases as non-sparse matrices, which makes extend() use a concatenation, which takes an awful lot of time.

My initial idea is to make sure the transformation matrices in the basis is a sparse matrix object by scipy, and then check whether this helps.

In any case, building my mirrors is a one-time operation so it’s not that awful if it takes a long time, but it’s annoying and it would be nice to improve that.

Script that can be used to test that can be found in #159

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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