Closed petiay closed 3 years ago
@cmurray-astro, @christinawlindberg, @galaxyumi?
Not sure if @christinawlindberg or @galaxyumi have worked with this code, but if you have do let me know your thoughts. (I am pretty sure the answer to my question is 'yes' but always good to double-check. :) )
https://github.com/BEAST-Fitting/beast/blob/f0830b210df971d4017d6e1ab3717c71460eacd5/beast/observationmodel/ast/make_ast_xy_list.py#L175-L183
It seems to me the positions assignments may have been inadvertently inserted under the wrong 'if' statement because presumably: "if xy_pos and not radec_pos..." then radec_positions need to be assigned. Instead, xy_positions are assigned. Also: "if radec_pos and not xy_pos..." then xy_positions need to be assigned, but instead radec_positions are assigned.
Switching the two blocks fixes an eventual error of the type, "UnboundLocalError: local variable 'x_positions' referenced before assignment."