Aperture beam command vs Integrating with pyCloudy

7 views
Skip to first unread message

Andrés Gúrpide

unread,
May 17, 2024, 9:57:59 AMMay 17
to pyCloudy
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.

phenomenological_combined_low_cloudy.sed
phenomenological_combined_low_cloudy_Z0.002_log_n0p65_Rin12p48pc_ff1.in

Christophe Morisset

unread,
May 27, 2024, 6:16:30 PMMay 27
to pyCloudy
Hi Andres,
Sorry for the delay to answer, end of semester activities...

I'm not very familiar with the aperture options in Cloudy, but it seems to me that what is done is an integral over the radius, and then some multiplication by a factor related to area ratios. If you pencil angular size is small compared to the angular size of your object, that's fine. pyCloudy actually has also a method to integrate 1D model over the radius: get_emis_rad(line_label). I compared the result of this integration to what Cloudy does when "aperture beam" is used: the ratio between Cloudy and pyCloudy is the sam for any emission line. That's OK, confirming that aperture in Cloudy is radial integration.
But now you are considering an beam size that is of order of your nebula angular size: this really needs a 2D image on which you put a mask corresponding to your aperture. And the fraction of emission that will enter the aperture will strongly depend on the emitting ion: [OIII] will enter more than [SII] for example. For these cases, you need to use the pyCloudy methods as you are doing, this is the only way to take into account the stratification of the ions in the nebula.

One last thing: the BLND 4363 label is not used anymore in Cloudy. Take care of this. You need to use the sum of O  3 4363.21A collisional and O 3C 4363.00A recombination contributions (if you suspect recombination to play any role).
Hope it helps,
Saludos,
Christophe
Reply all
Reply to author
Forward
0 new messages