Ticket #388 (new defect - etc)

Opened 4 weeks ago

Last modified 4 weeks ago

incorrect comment for hydrogenic line labels

Reported by: peter Owned by: nobody
Priority: major Milestone:
Component: output Version: trunk
Keywords: Cc:


Cloudy generates incorrect comments for hydrogenic line labels. If you run:

save line labels "label.txt"

the file label.txt will contain this entry

3672 H 1 6562.81A H-like, 2 5, 2^2S - 3^2P

This is incorrect as this line contains all fine-structure components of the n = 3 -> 2 transition in H I, not just 3^2P -> 2^2S. This is just one example of many.

Change History

Changed 4 weeks ago by peter

I looked a bit further at this problem. The root cause seems to be the code on lines 24-94 of prt_lines_hydro.cpp (and other parts of the code that use the same logic). If I read the code correctly, we decided (out of misguided stinginess?) not to allocate a separate stack entry for the sum of the fine-structure components, but rather reuse the n^2S - n'^2P entry for that purpose. So this stack entry has two meanings, either the n^2S - n'^2P fine-structure component, or the full n - n' blend, depending on where we are in the flow of the code. This split personality is the cause of the erroneous comments in the line labels.

The clean solution would be to create a separate stack entry for the blend, so that each entry can get a correct comment attached. We may also need entries for collapsed states all the way down to n=1 so that these blend lines have a correct state to link to. Not sure how much work that would be.

Are there other suggestions for fixing this?

Note: See TracTickets for help on using tickets.