<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><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></body>
</html>