<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Alex,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Sorry for the trouble--I'll see if I can figure out what's gone wrong on this end.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">It looks like you're running yt 3.2--can you tell me what version of NumPy you are running?</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Best,</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">John<br><br><span style="font-size: 13pt; background-color: rgba(255, 255, 255, 0);">John ZuHone</span><br><div><span style="background-color: rgba(255, 255, 255, 0);">Kavli Center for Astrophysics and Space Research<br>Massachusetts Institute of Technology<br><a href="x-apple-data-detectors://0" x-apple-data-detectors="true" x-apple-data-detectors-type="address" x-apple-data-detectors-result="0">77 Massachusetts Ave.</a>, 37-582G<br><a href="x-apple-data-detectors://1/0" x-apple-data-detectors="true" x-apple-data-detectors-type="address" x-apple-data-detectors-result="1/0">Cambridge, MA 02139</a><br>(w) <a href="tel:617-253-2354" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="1/1">617-253-2354</a><br>(m) <a href="tel:781-708-5004" x-apple-data-detectors="true" x-apple-data-detectors-type="telephone" x-apple-data-detectors-result="1/2">781-708-5004</a><br><a href="mailto:jzuhone@space.mit.edu" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="1/3">jzuhone@space.mit.edu</a><br><a href="mailto:jzuhone@gmail.com" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="2">jzuhone@gmail.com</a><br><a href="http://www.jzuhone.com/" x-apple-data-detectors="true" x-apple-data-detectors-type="link" x-apple-data-detectors-result="3">http://www.jzuhone.com</a></span><br style="font-family: UICTFontTextStyleBody; -webkit-text-size-adjust: auto;"></div></div><div><br>On Aug 25, 2015, at 9:41 AM, alex volioths <<a href="mailto:alex-volos@hotmail.com">alex-volos@hotmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hello everyone,<div><br></div><div>I've been practicing with the example "Creating a X-ray observation from an in-memory dataset" </div><div>from here <a href="http://yt-project.org/doc/analyzing/analysis_modules/photon_simulator.html" target="_blank" style="font-size: 12pt;">http://yt-project.org/doc/analyzing/analysis_modules/photon_simulator.html</a> </div><div><br></div><div>However even with simple copy and paste after defining the photons I get this error message:</div><div><br></div><div>
<br><br>
  File <span style=" color:#006400;">"/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py"</span>, line <span style=" color:#006400;">685</span>, in <span style=" color:#9400d3;">runfile</span><br>
    execfile(filename, namespace)<br>
<br><br>
  File <span style=" color:#006400;">"/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py"</span>, line <span style=" color:#006400;">78</span>, in <span style=" color:#9400d3;">execfile</span><br>
    builtins.execfile(filename, *where)<br>
<br><br>
  File <span style=" color:#006400;">"/home/afi/Documents/X_ray_sim/X_mock.py"</span>, line <span style=" color:#006400;">75</span>, in <span style=" color:#9400d3;"><module></span><br>
    exp_time, thermal_model, center="c")<br>
<br><br>
  File <span style=" color:#006400;">"/usr/local/lib/python2.7/dist-packages/yt-3.2-py2.7-linux-x86_64.egg/yt/analysis_modules/photon_simulator/photon_simulator.py"</span>, line <span style=" color:#006400;">330</span>, in <span style=" color:#9400d3;">from_scratch</span><br>
    photons = photon_model(data_source, parameters)<br>
<br><br>
  File <span style=" color:#006400;">"/usr/local/lib/python2.7/dist-packages/yt-3.2-py2.7-linux-x86_64.egg/yt/analysis_modules/photon_simulator/photon_models.py"</span>, line <span style=" color:#006400;">140</span>, in <span style=" color:#9400d3;">__call__</span><br>
    kT_bins = np.linspace(kT_min, max(my_kT_max, kT_max), num=n_kT+1)<br>
<br><br>
  File <span style=" color:#006400;">"/usr/lib/python2.7/dist-packages/numpy/core/function_base.py"</span>, line <span style=" color:#006400;">87</span>, in <span style=" color:#9400d3;">linspace</span><br>
    step = (stop-start)/float((num-1))<br>
<br><br>
  File <span style=" color:#006400;">"/usr/local/lib/python2.7/dist-packages/yt-3.2-py2.7-linux-x86_64.egg/yt/units/yt_array.py"</span>, line <span style=" color:#006400;">745</span>, in <span style=" color:#9400d3;">__sub__</span><br>
    ro = sanitize_units_add(self, right_object, "subtraction")<br>
<br><br>
<span style=" color:#4682b4;">  File </span><span style=" color:#006400;">"/usr/local/lib/python2.7/dist-packages/yt-3.2-py2.7-linux-x86_64.egg/yt/units/yt_array.py"</span><span style=" color:#4682b4;">, line </span><span style=" color:#006400;">134</span><span style=" color:#4682b4;">, in </span><span style=" color:#9400d3;">sanitize_units_add</span><br>
<span style=" color:#8b0000;">    raise YTUnitOperationError(op_string, inp.units, dimensionless)</span><br>
<br><br>
<span style=" color:#8b0000;">YTUnitOperationError:</span> The subtraction operator for YTArrays with units (keV) and (1) is not well defined.<br>
<br><!--EndFragment--><br>Any ideas? I am new to yt and i can't see something wrong.<br><br><br>Thnak you<br>Alex<br></div><h2 style="box-sizing: border-box; font-family: Raleway, 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.1; color: rgb(51, 51, 51); margin-top: -45px; margin-bottom: 11px; font-size: 34px; content: " "; height: 45px; visibility: hidden; background-color: rgb(255, 255, 255);">Creating a X-ray observation from an in-memory dataset</h2><h2 style="box-sizing: border-box; font-family: Raleway, 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.1; color: rgb(51, 51, 51); margin-top: -45px; margin-bottom: 11px; font-size: 34px; content: " "; height: 45px; visibility: hidden; background-color: rgb(255, 255, 255);">Creating a X-ray observation from an in-memory dataset</h2>                                     </div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>yt-users mailing list</span><br><span><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a></span><br><span><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a></span><br></div></blockquote></body></html>