Opened 11 months ago

Closed 3 months ago

#388 closed defect - etc (fixed)

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 (2)

comment:1 Changed 11 months 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?

comment:2 Changed 3 months ago by mchatzikos

Resolution: fixed
Status: newclosed

Fixed as of r11971. Only the levels for n=1 and n=2 are now reported individually, all other levels are reported by their principal quantum number. See log for details.

Note: See TracTickets for help on using tickets.