Jashcraf / katsu

Polarimetric Data Reduction and machine control for measuring the polarization of observatories
https://katsu.readthedocs.io
MIT License
3 stars 0 forks source link

Have shape be readable from input parameters #27

Open Jashcraf opened 2 months ago

Jashcraf commented 2 months ago

Say you want to initialize a spatially-varying polarizer

psg_polarizer = linear_diattenuator(angles, transmission)

if angles and transmission are arrays, then this errors out because the shape needs to be specified. e.g.

psg_polarizer = linear_diattenuator(angles, transmission, shape=angles.shape)

I would prefer that the construction be smart enough to pull the shape from the input parameters. There’s some logic that goes into asserting that the input params all need to be the same shape for this to work.

@kenjim21 any interest in working on this?

kenjim21 commented 2 months ago

Sure, I'll take a look and see what I can find