karllark / DIRTY_dustrt

DIRTY: 3D dust radiative transfer for dusty astrophysical sources
https://dirty-dustrt.readthedocs.io
5 stars 1 forks source link

Add an internal observer as an option #25

Closed karllark closed 8 months ago

karllark commented 1 year ago

An internal observer is now an option. The specifications for the internal observer are given in the parameter file. See standard_sphere_internal_observer.param for an example.

The biggest change was adding a distance target to the photon trajectory calculation. Now the photon will stop when it reaches the target distance or tau. Other changes were needed to create the output images in spherical coordinates instead of a tangent projection. The output image for the internal observer has dimensions of x = phi and y = cos(theta) and the origin (phi, theta) = (0, 0) is in the middle of the image. I used cos(theta) for the y-axis instead of theta as this should capture the information more uniformly.

The output image dimensions can now be specified for x and y independently.

Some formatting changes also included. Will likely do a separate PR to reformat all the code to a common format (likely the Google recommended one).

Should fix #28

karllark commented 1 year ago

Example of internal vs external observer of the same model.

Attached image shows the image for an internal observer at (0.5, 0, 0) pc (left) and an external observer located 100 pc (right) from a sphere of homogeneous dust with radius = 1 pc and a radial tau = 1.0. The illuminating star is located at (-0.5, -0.5, -0.5) pc in the system. The image for the internal observer has dimensions of x = phi and y = cos(theta) and the origin (phi, theta) = (0, 0) is in the middle of the image. I used cos(theta) for the y-axis instead of theta as this should capture the information more uniformly.

internal_vs_external_observer

karllark commented 8 months ago

Fixed the internal observer output image y-axis being flipped. internal_vs_external_observer