add a new model

5 views
Skip to first unread message

Nicola Schneider

unread,
Apr 5, 2025, 5:13:18 AMApr 5
to PDR Toolbox
HI, I want to add a ratio that is not in the WK2020 model set and I do the following:
wk                  = ModelSet("wk2020", z=1)
CO_1110        = wk.get_model("CO_1110" )
CO_87             = wk.get_model("CO_87" )
ratio_l_CO1110_CO87   = CO_1110/CO_87
wk.add_model ("CO_1110/CO_87", model=ratio_l_CO1110_CO87, title="CO(J=11-10)/CO(J=8-7)")
wk.table.show_in_notebook()

mp = ModelPlot(wk)

But when I want to use the model for plotting measurements, it does not work.

AttributeError: 'Measurement' object has no attribute 'modeltype'

What is going wrong?
Best wishes, Nicola




Marc W. Pound

unread,
Apr 6, 2025, 3:31:34 PMApr 6
to Nicola Schneider, PDR Toolbox
Hi Nicola

1. What version of pdrtpy are you using.    
    import pdrtpy
    pdrtpy.version()

2.  Can you send me your full python listing including the command that is failing?

thanks
Marc


--
You received this message because you are subscribed to the Google Groups "PDR Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdrt+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pdrt/1f19cef6-2826-4b80-ad02-7df9fb781b38n%40googlegroups.com.


--
Dr. Marc Pound
Research Scientist
Astronomy Department
University of Maryland, College Park
Reply all
Reply to author
Forward
0 new messages