Hi everyone,
I'm finding differences between the output of Cloudy using the aperture beam command and the results I get integrating the nebula manually using pc.C3D and I'd like to understand whether there's something I'm missing.
First, to be clear, I find agreement when the aperture beam command is not used (i.e. when Cloudy returns the line luminosity over the whole nebula) between the .lines and the manual integration.
However, when using "aperture beam size 3.1415" and "aperture beam covering factor 0.5" I get the that the ratio between the ".lines" file and the manual integration (masking the nebula outside circular region of 1", as the aperture beam size is in arcsec^2 i.e. pi x 1 arcsec^2 and taking half of that flux because of the aperture covering factor of 1/2) is 0.75-1 depending on the model and density, that is, I do not always find agreement between the two approaches. I attach my .in and .sed for a model that according to my calcs yields a ratio of .75 in OIII5007 between the two approaches.
I've checked that increasing the res of the 3D cube is not the issue and covering and filling factors are all unity.
My python code is a bit convoluted as the image is regidded prior to the masking, but I've save the filtered image and check that the area covered is the 3.1415 arcsec^2 and the fact that for some models I get consistent values tells me the issue should not be on my code, but I cannot rule that out. I provide some minimal code below
model_name = "phenomenological_combined_low_cloudy_Z0.002_log_n0p65_Rin12p48pc_ff1"
pcmodel = pc.CloudyModel(model_name)
cube_size = 261
M_sphere = pc.C3D(pcmodel, dims=cube_size, center=True, n_dim=1)
line = "O__3_500684A"
line_map = M_sphere.get_emis(line).sum(0)
#then I filter the map with a circle centred on the image and radius 1 arcsec, creating a modelima (this is an mpdaf.Image object with the pixels outside the radius masked)
# we have added the emissivities on one axis, we add the rest and multiply by the volume element
L_o3 = np.ma.sum(modelima.data) * M_sphere.cub_coord.cell_size
F_o3 = L_o3 * 0.5 / (4 * np.pi * D.to(
u.cm).value**2)
# read .lines
linedata = np.genfromtxt(model_name + ".lines", names=True, delimiter="\t")
print("Ratio integrated/.lines", linedata[line] / F_o3)
Any help on what am I missing would be appreciated.
I'm using pyCloudy version
0.9.13 and cloudy 22.02.