nasa / cape

Computational Aerosciences Productivity & Execution
Other
22 stars 9 forks source link

Bug: Coefficient Negations in Databooks #9

Closed rbreslavsky closed 1 year ago

rbreslavsky commented 1 year ago

When specifying a component transformation like the one below, it seems that databooks negate CLL/CLN regardless of user intention:

"component": { "Type": "FM", "Transformations": [ { "Type": "ScaleCoeffs", "CLL": 1, "CLN": 1 } ] } ,

In this case, Databooks seem to perform two scaling transformations. The first action is to multiply each of CLL and CLN by "1". The next action is to subsequently multiply each by "-1". The end result is that databook always multiplies CLL and CLN by "-1" regardless of whether the scaling value is 1, -1, or not specified (defaults to -1).

This is not true for reports, which seem to faithfully reproduce the desired scaling if a value is specified. If a scaling value is not specified, reports do not seem to modify CLL and CLN.

nasa-ddalle commented 1 year ago

Fixed by 9bfc091e. Caused by developer's logic error rather than coding error. Now anything that scales either CLL or CLN will turn off that default transformation.