psmd-iberutaru / Lezargus

The accompanying data software package to the IRTF SPECTRE Spectrograph.
MIT License
0 stars 0 forks source link

LezargusContainer arithmetic needs to be more streamlined. #31

Open psmd-iberutaru opened 1 month ago

psmd-iberutaru commented 1 month ago

There are constant errors from the type checker.

The issues are as follows.


The scope of the arithmetic should be limited to operations with itself and single values (i.e. floats). The main parent class can handle the arithmetic checking as usual.

The Pylance checker can adapt to the use of Self, but because of the reduced arithmetic above, some modifications need to be propagated.

For arithmetic extending beyond above, conversions (i.e. broadcasting functions) should be used to convert at least one operand to the appropriate type.

Units needs to be propagated.