isochrones
isochrones copied to clipboard
modify add_models()
modify add_models() so that it assigns _0 to the brightest star in the system
Great, thanks-- I'm looking over this and have a few suggestions. I'll get back to you soon (have to go to a meeting now but will be back and then will go through this and send comments).
Actually, I'm going to be delayed a bit more, but I will get back to this hopefully later today.
OK, a few initial comments:
- the
get_mag_leaffunction depends on a particular naming convention of each observed leaf, one that is not really enforced anywhere, so this is not a reliable way to get the magnitude from anObsNode. Instead, you should take advantage of the fact that you can access the observed magnitude vian.value[0], ifnis the node in question. - This is somewhat of a corner case, but it shows up in
K00177, the example case I've been using to check things---the magnitude comparison can only be between the same instruments... that is, it makes no sense to compare a magnitude from one survey to that of another. For example, inK00177, my default model definition assigns model nodes to four stars observed by Kraus, though only two of them are observed by Robo-AO. So in this case,define_modelsneeds to know what instrument is shared by all the chosen leaves, and compare those observed magnitudes. - We need to be able to handle the case that assigns more than one model node to a given observed star. It's not clear that this current implementation will allow this.
Anyway, this is a good start on a tough problem! I'll be thinking about this more; stay tuned! Feel free to use this implementation if it works for your current synthetic simulations, but our goal will be something a bit more robust.
Another solution that might be even more robust is just to have the _get_leaves and select_leaves functions to by default return leaves in some sort of ordered fashion, since this is currently what dictates the labels of the model nodes...
Or to just raise a warning if things end up out of order, and then have a separate method do the rearranging if desired?... I'm just brainstorming here, the best solution isn't obvious to me!