External Programs

SPHtoGrid.jl provides helper function for two external sph mapping Codes: Smac and P-Smac2.

Smac

Smac is a SPH mapping Code by Klaus Dolag and others. The implementation is described in Dolag et al. 2005.

Smac isn't public unfortunately. So these functions are mainly for my personal use. If you do have access to Smac, here's a reference to what you can do.

SPHtoGrid.jl provides some functions to read the FITS and binary output of Smac. To get the binary format you need to set FILE_FORMAT = 1 in the parameter file.

Writing the parameter file

You can write a Smac1 parameter file with

SPHtoGrid.write_smac1_parFunction
write_smac1_par( path="./"; kwargs...)

Writes a Smac parameter file. Add keyword arguments according to the smac1 parameter file.

source

Reading image information

If you set FILE_HEADER = 1 in the Smac parameter file you can read the information of the image header into a Smac1ImageInfo with:

For a Smac1 FITS file you can read the header into a mappingParameters struct with

Reading the image

The image itself can be read with

Missing docstring.

Missing docstring for read_smac1_binary_image. Check Documenter's build log for details.

P-Smac2

P-Smac2 by Julius Donnert is an advanced mapping code for a multitude of different quantities.

Writing the parameter file

To run a mapping and plotting loop from a Julia script you need to update the parameter files on the fly. The function write_smac2_par provides this functionality.

SPHtoGrid.write_smac2_parFunction
write_smac2_par(x, y, z,
                euler_angle_0, euler_angle_1, euler_angle_2,
                xy_size, z_depth, xy_pix::Integer,
                input_file, output_file, path,
                effect_module::Integer=0, effect_flag::Integer=0,
                ν_obs::Real=1.44e9, cosmology::Integer=0,
                CR_pmin::Real=10.0, CR_pmax::Real=1.e7)

Writes a P-Smac2 parameter file. Not all relevant parameters implemented yet!

source

Reading image information

For a Smac1 FITS file you can read the header into a mappingParameters struct with

Reading the image

The image itself can be read with