CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
68 stars 67 forks source link

Dolag Magnetic Field Parameters #379

Closed JonPaulLundquist closed 7 months ago

JonPaulLundquist commented 2 years ago

The Dolag magnetic field (dolag_B_54-186Mpc_440b.raw) provided does not include any instructions on how it should be used. Such as the size and b_factor. Loading the field with:

gridSize = 440
size = 186*Mpc
b_factor = 54*10**9 * nG
boxOrigin = Vector3d(-0.5*size,-0.5*size,-0.5*size)

Assuming supergalactic coordinates I would assume that I would be able to pick out the features shown in Figure 12 of the paper CRPropa references for this field (https://iopscience.iop.org/article/10.1088/1475-7516/2005/01/009/pdf). This is not the case. Nor, assuming galactic or equatorial coordinates. This paper seems to use a different field with a different size and grid size. The CRPropa paper (https://arxiv.org/pdf/1603.07142.pdf) also used a different size and number of cells than are compatible with this file.

This is how I'm finding coordinates:

steps = linspace(-(size/2)/Mpc, (size/2)/Mpc, gridSize)
x = zeros((steps.size**3), dtype='float16')
y = zeros((steps.size**3), dtype='float16')
z = zeros((steps.size**3), dtype='float16')
i = 0
for j in range(steps.size):
    for k in range(steps.size):
        for m in range(steps.size):
            x[i] = steps[j]
            y[i] = steps[k]
            z[i] = steps[m]
            i = i + 1

D = norm([x, y, z], axis = 0) #Distances from coordinates

supergalactic = cartesian_to_spherical(x,y,z)
supergalactic = SkyCoord(sgl=supergalactic[2], sgb=supergalactic[1], frame='supergalactic', unit='rad')

Bmag = zeros(steps.size**3, dtype='float32')
i = 0
for line in fileinput.input(['DolagField.txt']):
    Bmag[i] = norm(fromstring(line, sep=' '))/(1000*nG)
    i = i + 1

This should give the magnetic field and positions for the grid points in the file. Please also see this thread https://github.com/CRPropa/CRPropa3/issues/373. If the parameters to use this file are unknown it should probably not be provided with an outdated reference.

JonPaulLundquist commented 2 years ago

This paper https://indico.cern.ch/event/258092/papers/1588499/files/4149-crpropa.pdf seems to imply that the size is 186 - 54 Mpc = 132 Mpc. If that's the case I would recommend the file name be changed as that is highly unintuitive... Using:

size = 132*Mpc
b_factor = 0.001 #10*10**9 * nG

I can find Virgo less than 10 degrees from where it's supposed to be at 20 Mpc (a Mpc or so off from Dolag) with a field of 2.4 microGauss. Good enough. It looks like this: MapDolagField_20Mpc

I can also find Perseus a couple of degrees from where it's supposed to be at 69 Mpc ( about 3 Mpc or so off from Dolag) with a field of 2.7 microGauss. Good enough. Though the field is a bit low. It looks like this:

MapDolagField_78Mpc

And Coma cannot be found because we're running out of box volume.

Does this appear to be correct? If so, I again recommend changing that file name and changing (or adding) a reference if it can be done.

Laruku25 commented 2 years ago

Hey John you want discuss this through discord or something? Can I have your email? I think I can get the quimby file which is more accurate to Dolag's paper. We could work on using that instead. Here's my email: msalas02@citymail.cuny.edu

JulienDoerner commented 7 months ago

I close the issue. If there are still issues please re-open it.