<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello again,<div>  I'm again running a very simple script from the cookbook, learning how to use the stellar spectrum generator.  It's just a simple tests of spectrum generation with stars of all the same age and mass. It fails with a key error on the dataset, even thought it's not really using the dataset for anything but a reference time (I think). Since it's all small, I'll clip it in below.  Here's the script itself:</div><div><br></div><div><div>from yt.mods import *</div><div>from yt.analysis_modules.star_analysis.api import *</div><div>ds = load("RD0009")</div><div><br></div><div>spec = SpectrumBuilder(ds, bcdir="/Users/hallman/work/data/sfData", model="chabrier")</div><div><br></div><div>sm = np.ones(100)</div><div>ct = np.zeros(100)</div><div><br></div><div>spec.calculate_spectrum(star_mass=sm, star_creation_time=ct, star_metallicity_constant=0.02)</div><div><br></div><div>spec.write_out(name="spec.out")</div><div><br></div><div><br></div><div>And here is the output:</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Traceback (most recent call last):</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">  File "starSpec.py", line 13, in <module></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">    spec.calculate_spectrum(star_mass=sm, star_creation_time=ct, star_metallicity_constant=0.02)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">  File "/Users/hallman/work/yt-x86_64/src/yt-hg/yt/analysis_modules/star_analysis/sfr_spectrum.py", line 387, in calculate_spectrum</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">    dt = (self.time_now - self.star_creation_time * self._ds['Time']) / YEAR</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">  File "/Users/hallman/work/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 249, in __getitem__</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">    return self.parameters[key]</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">KeyError: 'Time'</div></div><div><br></div><div><br></div><div>Even if I modify "sfr_spectrum.py" to use the key "current_time", it still fails with the same error.  This is with yt-3.0, dataset created with the tip of enzo-dev as of about 20 minutes ago.  It fails on older enzo datasets as well with the same error.</div><div><br></div><div>Thanks for any help.</div><div><br></div><div>Eric</div><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>-- <br>Eric Hallman<br>Tech-X Corporation               <a href="mailto:hallman@txcorp.com">hallman@txcorp.com</a><br>5621 Arapahoe Ave, Suite A       Phone: (720) 254-5833<br>Boulder, CO 80303                Fax:   (303) 448-7756<br>--</div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>