This project probes the structure of star forming molecular clouds by using dust emission as a tracer. The ‘formal’ assessment section of the project was completed on 24th May 2016 with a presentation (found in this repo) to peers on the work completed.
**The project has also been extended beyond this assessment period to encompass 8 weeks of the Summer. This work involves contributions from Dr. Paul Clark, Prof. Anthony Whitworth and Dr. Ken Marsh.
This repository contains all code (written exclusively in Python) pertaining to the project. At present, the only specialist package used is RADMC-3D, a raytracing radiative transfer code (http://www.ita.uni-heidelberg.de/~dullemond/software/radmc-3d/).
The (non-exhaustive) aims of the Summer extension are:
The primary (simplified) aims of this project were:
27/06/2016: One week of work has culminated in a working PSF convolution script. At this point, it convolves any RADMC-3D FITS output with the PSF for a given filer. Now moving on to determine number of beams required to provide better resolution of Arepo data, as well as refactoring code into functions to aid productivity.
09/05/16: Final commit prior to signing off on development. All code has now been written, including the supplementary dissertation. To run code, simply use run the handler.py
file. This will ask for the simulation to be run: working simulations include the sim
and sph
responses (filament still non-functional). If the user wishes, an inputs.txt
file can be directed to the code such the user inputs from the code will come directly from this file, e.g. to run the basic isothermal simulation one would run python handler.py < inputs_sim.txt
- this would run the code from start to finish.
20/03/16: The machinery to analyse data is now all in place and functioning. All SEDs produced are the correct form, and the chi-squared routine, that now successfully loops over each pixel, works correctly. The next step in producing further results is to:
08/02/16: Code has been reformatted since last major additions, and a workflow has now been devised. To properly run the code, the following commands must be executed in the following order:
cd
to a simulation directory, eg psw/background_15K
python sim_psw.py
to run the main raytracing simulation. This will also run datafilegen.py
and save the .inp
files to the working directory to be read in immediately after the script has been completed and the ray trace initiated. Once ray trace has been completed, save output (an image) if required (not necessary, though makes a nice wall hanging picture)python psw_sed.py
to compute the object's Spectral Energy Distribution. This script will not plot in any active windows but will save all required plots to the working directory. It will also write the essential SED info to a .txt
file in the stats
directory for later use, appending each time a band_sed.py
script is run.cd
to ../../../stats
and run python chiv2.py
to plot the averaged SED information and to fit theoretical SED to it.NOTE: the chi-squared routine is not yet complete, and shall we completed as the next task however the basic data generation, simulation and reduction routines have now been completed and work.
04/12/15: The model has since been adapted to plot the three passbands on SPIRE in order to begin generating the synthetic data required to compare with the real data from Herschel SPIRE. However, transmission has not been accounted for in these models to date - the .txt files containing the transmission curve do not have regular wavelength spacing, necessitating the use of interpolation to generate a linearly spaced wavelength-transmission parameter space.
Once this is complete plots of each wavelength are multiplied by their transmission coefficient and summed (weighted) over all possible wavelengths in the passband to give the final image as seen by SPIRE. At this point, an SED can be determined by invoking radmc3d spectra
(check that this is the correct command).
20/11/15: Custom data files for RADMC-3D are now generated with a Python script that asks for user defined quantities. It is possible to compute the radius of the molecular cloud from its mass and density (the code requests number density and converts this to g/cm^3). The resulting radius is then used to help define the image width (i.e. the user is told what the cloud radius is so as to make appropriate adjustments to the image width). Furthermore this width is split into n user defined pixels and each pixel in each dimension looped over to assign density and temperature.
These files are then copied over to the directory that the image raytrace is performed. By invoking radmc3d image
the raytrace is then performed (providing all the information required is written to the problem-params.inp
file - this is usually performed in model setup, ie radmc3dPy.analyze.writeDefaultParfile('model_name')
). Allowing the code to run produces an image as seen below:
IMPORTANT: ALL UNITS MUST BE CGS (centimetre-grams-second)
As of 11/10/15 minor tests have been performed of RADMC-3D in Python to ascertain its viability for the project. Those tests setup various simple problems and simulations, the most useful of which is the creation of a 2D (as well as 1D) sphere of uniform temperature.
As of 14/10/15 more complex simulations have been set up (#1 handles this).
This list is not exhaustive of the remaining tasks in the project, and is updated as and when new ideas are added. Furthermore, this is not representative of the project's progress. More often than not, for larger implementations more detailed issues will be created in addition to the notes found here. Where possible, those issues will be linked next to the entry.
ValueError: zero-size array to reduction operation minimum which has no identity
error that RADMC-3D is throwing when trying to run the raytrace with all custom files in place.radmc3d sed loadlambda