You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im running into a bit of a low end error when trying to do some slightly hacky stuff with the VectorVortexCoronagraph.
For my M.Sc. thesis I am simulating optics such as the VectorVortexCoronagraph and the effect of manufacturing errors on the performance of these optics. In essence, Im implementing the footprint of (in my case) a direct writing system in the vortex patterns that I simulate.
This footprint is a mapping function that says: if I try to write this fast axis orientation (fao), the actual fao that I get will be that instead. When you use something along the lines of a closure in python, this means that I make a function f: x |-> x' where x'-x is the systematic fao offset given x.
I then take the VectorVortexCoronagraph code and in the __init__ I add a parameter called something like manufacturing_map
and in the make_instance method I wrap the fast_axis_orientation parameter this map:
The current issue is that the manufacturing mapping function as defined in self can't be called. The AgnosticOpticalElement gets the instance data (line 607, in get_instance_data) and then tries to hash the arguments of the function (line 323, in _get_cache_keys). The issue is that fields are an unhashable type.
The function in self also gets a different call signature according to my vscode linter. It shows that the call signature goes from (Field) -> Field to (input_grid, output_grid, wavelegnth) -> Any.
If I use a global overwrite it works fine but thats quite ugly and really hacky and I don't like it.
Is there a neat way to do this?
Cheers,
Tom
The text was updated successfully, but these errors were encountered:
Dear team,
Im running into a bit of a low end error when trying to do some slightly hacky stuff with the
VectorVortexCoronagraph
.For my M.Sc. thesis I am simulating optics such as the
VectorVortexCoronagraph
and the effect of manufacturing errors on the performance of these optics. In essence, Im implementing the footprint of (in my case) a direct writing system in the vortex patterns that I simulate.This footprint is a mapping function that says: if I try to write this fast axis orientation (fao), the actual fao that I get will be that instead. When you use something along the lines of a closure in python, this means that I make a function f: x |-> x' where x'-x is the systematic fao offset given x.
Or in pythonic expression
I then take the
VectorVortexCoronagraph
code and in the__init__
I add a parameter called something likemanufacturing_map
and in the
make_instance
method I wrap the fast_axis_orientation parameter this map:The current issue is that the manufacturing mapping function as defined in self can't be called. The
AgnosticOpticalElement
gets the instance data (line 607, in get_instance_data) and then tries to hash the arguments of the function (line 323, in _get_cache_keys). The issue is that fields are an unhashable type.The function in
self
also gets a different call signature according to my vscode linter. It shows that the call signature goes from(Field) -> Field
to(input_grid, output_grid, wavelegnth) -> Any
.If I use a global overwrite it works fine but thats quite ugly and really hacky and I don't like it.
Is there a neat way to do this?
Cheers,
Tom
The text was updated successfully, but these errors were encountered: