Problem using covering_grid as data_source for the photon_simulator
Hi, I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error: photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented. But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator? Cheers, Markus
Hi Markus, Can you send a script so I can figure out what you are trying to do exactly? You probably need ds.region, but if you send a script I will know for sure. John Z Sent from my iPod
On May 25, 2016, at 12:23 PM, Markus Haider
wrote: Hi,
I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error:
photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented.
But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator?
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi John, Thanks for your fast reply. So generally we are trying to make a mock spectrum of a galaxy cluster around the iron line. I enclosed the script I use, but maybe it is not of a big help as I just started doing this. You are probably right that I should youse ds.region. What I wanted to do is selecting a line of sight which is only one cell wide (native resolution of the simulation) but e.g. 1 Mpc deep. Cheers, Markus On 2016-05-25 18:28, John Zuhone wrote:
Hi Markus,
Can you send a script so I can figure out what you are trying to do exactly?
You probably need ds.region, but if you send a script I will know for sure.
John Z
Sent from my iPod
On May 25, 2016, at 12:23 PM, Markus Haider
wrote: Hi,
I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error:
photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented.
But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator?
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Markus, ds.ortho_ray should work? http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selec... http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selec... But as a warning see: http://yt-project.org/docs/dev/faq/index.html#why-are-the-values-in-my-ray-o... http://yt-project.org/docs/dev/faq/index.html#why-are-the-values-in-my-ray-o... but that shouldn’t matter for photon_simulator, I don’t think. BTW, since you use this module a lot, I should probably point out here that there will be no further development of photon_simulator in yt as it is now being transitioned into a new package, pyXSIM: http://bitbucket.org/jzuhone/pyxsim http://bitbucket.org/jzuhone/pyxsim which is stable now but doesn’t have adequate documentation for me to have an official release. It will be the same software as the yt version with some minor adjustments. If you want to try it, mail me off-list and I can tell you how to install it and how to re-write your script to work with it. The version currently in yt will stay there for the time being, so no need to worry, but I will not be updating it unless there are bug reports. Best, John
On May 25, 2016, at 12:39 PM, Markus Haider
wrote: Hi John,
Thanks for your fast reply. So generally we are trying to make a mock spectrum of a galaxy cluster around the iron line. I enclosed the script I use, but maybe it is not of a big help as I just started doing this. You are probably right that I should youse ds.region. What I wanted to do is selecting a line of sight which is only one cell wide (native resolution of the simulation) but e.g. 1 Mpc deep.
Cheers, Markus
On 2016-05-25 18:28, John Zuhone wrote:
Hi Markus,
Can you send a script so I can figure out what you are trying to do exactly?
You probably need ds.region, but if you send a script I will know for sure.
John Z
Sent from my iPod
On May 25, 2016, at 12:23 PM, Markus Haider
wrote: Hi,
I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error:
photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented.
But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator?
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi John, Thanks for hinting me to ds.ortho_ray. This is what I meant :-) Btw, For a different anaylsis I would need to understand how the yt.box command works. Does it contain all the cells which have their center between the left and right boundaries or only cells which have both their center and edges between the specified left and right boundaries? Cheers, Markus On 2016-05-25 18:44, John Zuhone wrote:
Hi Markus,
ds.ortho_ray should work?
http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selec...
But as a warning see:
http://yt-project.org/docs/dev/faq/index.html#why-are-the-values-in-my-ray-o...
but that shouldn’t matter for photon_simulator, I don’t think.
BTW, since you use this module a lot, I should probably point out here that there will be no further development of photon_simulator in yt as it is now being transitioned into a new package, pyXSIM:
http://bitbucket.org/jzuhone/pyxsim
which is stable now but doesn’t have adequate documentation for me to have an official release. It will be the same software as the yt version with some minor adjustments. If you want to try it, mail me off-list and I can tell you how to install it and how to re-write your script to work with it.
The version currently in yt will stay there for the time being, so no need to worry, but I will not be updating it unless there are bug reports.
Best,
John
On May 25, 2016, at 12:39 PM, Markus Haider
mailto:markus.haider@uibk.ac.at> wrote: Hi John,
Thanks for your fast reply. So generally we are trying to make a mock spectrum of a galaxy cluster around the iron line. I enclosed the script I use, but maybe it is not of a big help as I just started doing this. You are probably right that I should youse ds.region. What I wanted to do is selecting a line of sight which is only one cell wide (native resolution of the simulation) but e.g. 1 Mpc deep.
Cheers, Markus
On 2016-05-25 18:28, John Zuhone wrote:
Hi Markus,
Can you send a script so I can figure out what you are trying to do exactly?
You probably need ds.region, but if you send a script I will know for sure.
John Z
Sent from my iPod
On May 25, 2016, at 12:23 PM, Markus Haider
mailto:markus.haider@uibk.ac.at> wrote: Hi,
I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error:
photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented.
But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator?
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org mailto:yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org mailto:yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org mailto:yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
On Friday, May 27, 2016, Markus Haider
Hi John,
Thanks for hinting me to ds.ortho_ray. This is what I meant :-)
Btw, For a different anaylsis I would need to understand how the yt.box command works. Does it contain all the cells which have their center between the left and right boundaries or only cells which have both their center and edges between the specified left and right boundaries?
It will contain all the cells that have centers between the left and right edge.
Cheers, Markus
On 2016-05-25 18:44, John Zuhone wrote:
Hi Markus,
ds.ortho_ray should work?
http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selec...
But as a warning see:
http://yt-project.org/docs/dev/faq/index.html#why-are-the-values-in-my-ray-o...
but that shouldn’t matter for photon_simulator, I don’t think.
BTW, since you use this module a lot, I should probably point out here that there will be no further development of photon_simulator in yt as it is now being transitioned into a new package, pyXSIM:
http://bitbucket.org/jzuhone/pyxsim
which is stable now but doesn’t have adequate documentation for me to have an official release. It will be the same software as the yt version with some minor adjustments. If you want to try it, mail me off-list and I can tell you how to install it and how to re-write your script to work with it.
The version currently in yt will stay there for the time being, so no need to worry, but I will not be updating it unless there are bug reports.
Best,
John
On May 25, 2016, at 12:39 PM, Markus Haider
javascript:_e(%7B%7D,'cvml','markus.haider@uibk.ac.at');> wrote: Hi John,
Thanks for your fast reply. So generally we are trying to make a mock spectrum of a galaxy cluster around the iron line. I enclosed the script I use, but maybe it is not of a big help as I just started doing this. You are probably right that I should youse ds.region. What I wanted to do is selecting a line of sight which is only one cell wide (native resolution of the simulation) but e.g. 1 Mpc deep.
Cheers, Markus
On 2016-05-25 18:28, John Zuhone wrote:
Hi Markus,
Can you send a script so I can figure out what you are trying to do exactly?
You probably need ds.region, but if you send a script I will know for sure.
John Z
Sent from my iPod
On May 25, 2016, at 12:23 PM, Markus Haider
javascript:_e(%7B%7D,'cvml','markus.haider@uibk.ac.at');> wrote: Hi,
I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error:
photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented.
But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator?
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org'); http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org'); http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org'); http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org _______________________________________________ yt-users mailing listyt-users@lists.spacepope.org javascript:_e(%7B%7D,'cvml','yt-users@lists.spacepope.org');http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Regarding using ds.ray in the photon simulator: I get the same error as I did using the covering grid. However, if I use ds.box it works. Here the error I get using ds.ray: /home/markus/programme/yt-x86_64/src/yt-hg/yt/analysis_modules/photon_simulator/photon_simulator.pyc in from_scratch(cls, data_source, redshift, area, exp_time, photon_model, parameters, center, dist, cosmology) 344 width = 0.0 345 for i, ax in enumerate("xyz"): --> 346 le, re = data_source.quantities.extrema(ax) 347 delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) 348 le -= 0.5*delta_max AttributeError: 'YTRay' object has no attribute 'quantities' Cheers, Markus
Hi, I was wondering if there is an easy way to make a projection plot through of a yt sphere or disk. The reason would be to check whether I actually selected the data I wanted to. Cheers, Markus
Hi Markus,
Yes, you can use the data_source keyword to provide the data container you
want to project.
For example:
sphere = ds.sphere(...)
p = yt.ProjectionPlot(..., data_source=sphere)
Britton
On Tue, Jun 14, 2016 at 4:00 PM, Markus Haider
Hi,
I was wondering if there is an easy way to make a projection plot through of a yt sphere or disk. The reason would be to check whether I actually selected the data I wanted to.
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Markus, Can you send a script so I can figure out what you are trying to do exactly? You probably need ds.region, but if you send a script I will know for sure. John Z
On May 25, 2016, at 12:23 PM, Markus Haider
wrote: Hi,
I wanted to use the photon simulator for mock x-ray observations on single cells and line of sights using single cells. For this I wanted to select the cells using covering_grid, but then I get the following error:
photon_simulator.py is doing delta_min, delta_max = data_source.quantities.extrema("d%s"%ax) and the result is YTDataSelectorNotImplemented: Data selector 'covering_grid' not implemented.
But maybe covering_grid is not the right thing for what I had in mind, how would you select the cells to pass as data_source to the photon simulator?
Cheers, Markus _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (4)
-
Britton Smith
-
John Zuhone
-
Markus Haider
-
Nathan Goldbaum