<p>I am looking for a way to convert RAMSES files to GADGET-2 binary files because I want to use the package SimSpin (<a href="https://github.com/kateharborne/SimSpin/blob/master/R/make_simspin_file.R" rel="nofollow noreferrer">https://github.com/kateharborne/SimSpin/blob/master/R/make_simspin_file.R</a>) which is used for generating mock galaxy IFS data cubes but it does not seem to take input files of RAMSES type. It only takes GADGET and HDF5 types. So, I want to find a way to convert my RAMSES simulation snapshots.</p>
<p>Thanks a lot!</p>
<ul>
<li>Springel, V., 2005 MNRAS 364 (4) 1105 <a href="https://academic.oup.com/mnras/article/364/4/1105/1042826" rel="nofollow noreferrer">The cosmological simulation code GADGET-2 </a> (open access) and <a href="https://arxiv.org/abs/astro-ph/0505010" rel="nofollow noreferrer">arXiv</a></li>
<li>Teyssier, R., 2002, year A &amp; A 385 (1), 337 <a href="https://www.aanda.org/component/article?access=bibcode&amp;bibcode=&amp;bibcode=2002A%2526A...385..337TFUL" rel="nofollow noreferrer">Cosmological hydrodynamics with adaptive mesh refinement. A new high resolution code called RAMSES</a> and <a href="https://arxiv.org/abs/astro-ph/0111367" rel="nofollow noreferrer">arXiv</a></li>
</ul>

CC BY-SA 4.0
2022-01-21T17:11:09.040Z
No answer, but 1) have you tried asking Kate Harbourne? 2) have you asked the people at Ramses,or Gadget?  3) Have you investigated pynbody - it mentions that it can load Ramses and save in gadget format.
James K
CC BY-SA 4.0
2022-01-21T23:12:50.207Z
For the benefit of the many readers like me who don't know RAMSES and/or GADGET-2 could you add links for each the way that you have for SimSPin? Github, documentation, papers, Wikipedia, etc. Something... anything... *Thanks!*
uhoh
CC BY-SA 4.0
2022-01-23T14:56:47.833Z
@uhoh, sure, GADGET:Springel V., Mon. Not. R. Astron. Soc. 364 (2005) 1105.

RAMSES:Teyssier R., Astronomy and Astrophysics 385 (2002) 337. Thanks!
Jerome
CC BY-SA 4.0
2022-01-23T15:04:20.050Z
@JamesK, I wanted to know if a general tool already exists before asking anyone. Since sometimes there are packages that take only gadget files or ramses files, so just wanted to know if anyone already uses tools for general conversion, so that it could be of use for any such packages not just SimSPin. Thanks for mentioning pynbody. Could you please link the documentation where it is mentioned that pynbody can load Ramses and save in Gadget?
Jerome
CC BY-SA 4.0
2022-01-23T15:07:44.970Z
https://pynbody.github.io/pynbody/loaders.html
James K
<galaxy><data-analysis><spectroscopy><python><n-body-simulations>
Is there a tool to convert N-body RAMSES simulation file formats to GADGET 2 format in Python?
Jerome
# Is there a tool to convert N-body RAMSES simulation file formats to GADGET 2 format in Python?

(Asked by: username_0 on 2022-01-21)

I am looking for a way to convert RAMSES files to GADGET-2 binary files because I want to use the package SimSpin (<https://github.com/kateharborne/SimSpin/blob/master/R/make_simspin_file.R>) which is used for generating mock galaxy IFS data cubes but it does not seem to take input files of RAMSES type. It only takes GADGET and HDF5 types. So, I want to find a way to convert my RAMSES simulation snapshots.

Thanks a lot!

* Springel, V., 2005 MNRAS 364 (4) 1105 [The cosmological simulation code GADGET-2](https://academic.oup.com/mnras/article/364/4/1105/1042826)  (open access) and [arXiv](https://arxiv.org/abs/astro-ph/0505010)
* Teyssier, R., 2002, year A & A 385 (1), 337 [Cosmological hydrodynamics with adaptive mesh refinement. A new high resolution code called RAMSES](https://www.aanda.org/component/article?access=bibcode&bibcode=&bibcode=2002A%2526A...385..337TFUL) and [arXiv](https://arxiv.org/abs/astro-ph/0111367)

**Tags:** galaxy, data-analysis, spectroscopy, python, n-body-simulations

> **Comments:**
> **username_1**: No answer, but 1) have you tried asking Kate Harbourne? 2) have you asked the people at Ramses,or Gadget?  3) Have you investigated pynbody - it mentions that it can load Ramses and save in gadget format.  
> **username_2**: For the benefit of the many readers like me who don't know RAMSES and/or GADGET-2 could you add links for each the way that you have for SimSPin? Github, documentation, papers, Wikipedia, etc. Something... anything... *Thanks!*  
> **username_0**: @username_2, sure, GADGET:Springel V., Mon. Not. R. Astron. Soc. 364 (2005) 1105.  RAMSES:Teyssier R., Astronomy and Astrophysics 385 (2002) 337. Thanks!  
> **username_0**: @username_1, I wanted to know if a general tool already exists before asking anyone. Since sometimes there are packages that take only gadget files or ramses files, so just wanted to know if anyone already uses tools for general conversion, so that it could be of use for any such packages not just SimSPin. Thanks for mentioning pynbody. Could you please link the documentation where it is mentioned that pynbody can load Ramses and save in Gadget?  
> **username_1**: https://pynbody.github.io/pynbody/loaders.html  

---

## 0 answers

