<div dir="ltr"><div>Dear Yt users.</div><div><br></div><div>Last week I asked a question about the function HaloMassFcn, as I can't get the fitting function it produces to match the data from the Halo Finder Comparison Project and from the DEUS simulations. After chatting with Nathan Goldbaum about the problem (here and on IRC), I still haven't found an explanation. The only possible explanation I have come up with so far is that there is a bug in the unit handling in HaloMassFcn, so that the masses of the fitting function is output in Msun/h**2, rather than Msun as it should -- this would explain why I need to divide the masses by h (which I set to 0.7) to match the data, which uses Msun/h as their mass-unit. However, it is entirely possible that I have simply misunderstood something, I just really can't figure out what it is. </div><div><br></div><div>Here is the script where I'm plotting the fitting function from HaloMassFcn, and comparing it to data from the Halo Finder Comparison project (<a href="https://arxiv.org/pdf/1104.0949v1.pdf" rel="noreferrer" target="_blank">https://arxiv.org/pdf/1104.0949v1.pdf</a>) and from on of the DEUS simulations (<a href="http://www.deus-consortium.org/deuvo/#download" rel="noreferrer" target="_blank">http://www.deus-consortium.org/deuvo/#download</a>), as well as the resulting plot:</div><div><br></div><div>script: <a href="http://paste.yt-project.org/show/6530/" rel="noreferrer" target="_blank">http://paste.yt-project.org/show/6530/</a><br>image <a href="http://imgur.com/otWW3QJ" rel="noreferrer" target="_blank">http://imgur.com/otWW3QJ</a><br><br>I'm using this version of yt:<br><br> Version = 3.2.3<br> Changeset = bdea84d95099 (stable) @<br></div><div><br></div><div>I'm also filing a bug on this issue: <a href="https://bitbucket.org/yt_analysis/yt/issues/1228/bug-in-halomassfcn-output-units">https://bitbucket.org/yt_analysis/yt/issues/1228/bug-in-halomassfcn-output-units</a></div><div><br></div>Best regards, Io.<br><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Message: 1<br>
Date: Mon, 23 May 2016 22:43:09 +0200<br>
From: Io Odderskov <<a href="mailto:io.odderskov@gmail.com" target="_blank">io.odderskov@gmail.com</a>><br>
To: <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
Subject: [yt-users] HaloMassFunction<br>
Message-ID:<br>
<<a href="mailto:CAC0EgOA-tpD5-0nZY9Ssyyh94zhRcXm1vYM6suyOzkucgOAjqg@mail.gmail.com" target="_blank">CAC0EgOA-tpD5-0nZY9Ssyyh94zhRcXm1vYM6suyOzkucgOAjqg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear Yt-users.<br>
<br>
I have just started used Yt, which I find to be very useful. However, I am<br>
having trouble converting the units of the output of the<br>
HaloMassFcn-function to match other data sets.<br>
<br>
I have tried comparing the Tinker 2008 fitting function produced by<br>
HaloMassFcn to the halo mass function from the Halo Finder Comparison<br>
Project (<a href="https://arxiv.org/pdf/1104.0949v1.pdf" rel="noreferrer" target="_blank">https://arxiv.org/pdf/1104.0949v1.pdf</a>) and to a halo catalogue<br>
from the DEUS consortium (<a href="http://www.deus-consortium.org/deuvo/#download" rel="noreferrer" target="_blank">http://www.deus-consortium.org/deuvo/#download</a>).<br>
In these cases, the halo masses are given in Msun/h, and the cumulative<br>
halo number density in h^3/Mpc^3. According to the Yt-documentation, the<br>
masses output by the HaloMassFcn-function should be in Msun, and the number<br>
densities in 1/Mpc^3. To convert to Msun/h and h^3/Mpc^3, I multiply the<br>
masses by h, and divide the number densities with h^3. In the attached<br>
figure, this corresponds to the line labelled "Tinker2008 - masses<br>
multiplied by h", which does not match the other data sets very well. If I<br>
instead divide the masses by h, I get the line labelled Tinker2008 - masses<br>
divided by h", which looks much better. But I really can't see how to<br>
justify this conversion.<br>
<br>
I hope you can help me figure out what I'm doing wrong :-)<br>
Thanks in advance!<br>
<br>
Best regards, Io.<br>
<br>
script: <a href="http://paste.yt-project.org/show/6530/" rel="noreferrer" target="_blank">http://paste.yt-project.org/show/6530/</a><br>
image <a href="http://imgur.com/otWW3QJ" rel="noreferrer" target="_blank">http://imgur.com/otWW3QJ</a><br>
<br>
version:<br>
<br>
Version = 3.2.3<br>
Changeset = bdea84d95099 (stable) @<br>
<br>
P.S. When I tried to do "yt upload_image", I got a 404 error. Perhaps imgur<br>
changed their API?<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160523/2bf755ec/attachment-0001.htm" rel="noreferrer" target="_blank">http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160523/2bf755ec/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 23 May 2016 15:51:20 -0500<br>
From: Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>><br>
To: Discussion of the yt analysis package<br>
<<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a>><br>
Subject: Re: [yt-users] HaloMassFunction<br>
Message-ID:<br>
<CAJXewOn9Eq5f6j_xdJJ-du6it1g4aaAOMiBiz=<a href="mailto:0-4sifsupk2w@mail.gmail.com" target="_blank">0-4sifsupk2w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
On Mon, May 23, 2016 at 3:43 PM, Io Odderskov <<a href="mailto:io.odderskov@gmail.com" target="_blank">io.odderskov@gmail.com</a>><br>
wrote:<br>
<br>
> Dear Yt-users.<br>
><br>
> I have just started used Yt, which I find to be very useful. However, I am<br>
> having trouble converting the units of the output of the<br>
> HaloMassFcn-function to match other data sets.<br>
><br>
> I have tried comparing the Tinker 2008 fitting function produced by<br>
> HaloMassFcn to the halo mass function from the Halo Finder Comparison<br>
> Project (<a href="https://arxiv.org/pdf/1104.0949v1.pdf" rel="noreferrer" target="_blank">https://arxiv.org/pdf/1104.0949v1.pdf</a>) and to a halo catalogue<br>
> from the DEUS consortium (<a href="http://www.deus-consortium.org/deuvo/#download" rel="noreferrer" target="_blank">http://www.deus-consortium.org/deuvo/#download</a>).<br>
> In these cases, the halo masses are given in Msun/h, and the cumulative<br>
> halo number density in h^3/Mpc^3. According to the Yt-documentation, the<br>
> masses output by the HaloMassFcn-function should be in Msun, and the number<br>
> densities in 1/Mpc^3. To convert to Msun/h and h^3/Mpc^3, I multiply the<br>
> masses by h, and divide the number densities with h^3. In the attached<br>
> figure, this corresponds to the line labelled "Tinker2008 - masses<br>
> multiplied by h", which does not match the other data sets very well. If I<br>
> instead divide the masses by h, I get the line labelled Tinker2008 - masses<br>
> divided by h", which looks much better. But I really can't see how to<br>
> justify this conversion.<br>
><br>
<br>
To convert to Msun/h, you're trying to multiply by h? I don't think that's<br>
right --- dividing by h is the correct thing to do.<br>
<br>
<br>
><br>
> I hope you can help me figure out what I'm doing wrong :-)<br>
> Thanks in advance!<br>
><br>
> Best regards, Io.<br>
><br>
> script: <a href="http://paste.yt-project.org/show/6530/" rel="noreferrer" target="_blank">http://paste.yt-project.org/show/6530/</a><br>
> image <a href="http://imgur.com/otWW3QJ" rel="noreferrer" target="_blank">http://imgur.com/otWW3QJ</a><br>
><br>
> version:<br>
><br>
> Version = 3.2.3<br>
> Changeset = bdea84d95099 (stable) @<br>
><br>
> P.S. When I tried to do "yt upload_image", I got a 404 error. Perhaps<br>
> imgur changed their API?<br>
><br>
<br>
Yeah, imgur changed their API. This is fixed in the development branch of<br>
yt but hasn't been backported to the stable branch. Perhaps we should do a<br>
3.2.4 release given than 3.3 is taking a bit longer than anticipated to<br>
release.<br>
<br>
<br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
><br>
-------------- next part --------------<br></blockquote></div></div></div>