half_light_r() using LSST filters

3 views
Skip to first unread message

Eric Tang

unread,
May 19, 2025, 8:46:41 PMMay 19
to pynbody-users
Hi All,

I tried to redefine half_light_r() to use LSST filters but got the following error. Any idea to fix this?

Regards,
Eric

Cell In[13], line 36, in ab_half_light_r(sim, band) 34 it = 0 35 #print(test_l, half_l) ---> 36 while ((np.abs(test_l - half_l) / half_l) > 0.01): 37 #while ((test_l - half_l / half_l) > 0.01) or ((test_l - half_l / half_l) < -0.01): 38 print(test_r, test_l, half_l) 39 it = it + 1 TypeError: bad operand type for abs(): 'CompositeUnit'


Andrew Pontzen

unread,
May 29, 2025, 7:26:41 AMMay 29
to pynbody-users
Sorry, I would probably need more context around what precisely you've done leading up to the error to be able to help...

All the best, Andrew
Reply all
Reply to author
Forward
0 new messages