Themis allows a wide variety of models to be compared to EHT data. This examples show how the query the semi-analytic gaussian spot model of Broderick& Loeb 2006, which is an explictly time dependent model that captures some aspects of variability in Sgr A*. This script explictly generates a series of images i.e. a movie using the sed of 2010 data run. The output of this script is given by orbiting_spot_movie_frame_i.d where i runs from 0 to 9 and is the frames of the movie in pmap format and each frame may be plotted with the python script vrt2_image.py. For example the fifth frame may be plotted using the commands:
The resulting 10 frame movie is shown below.
MPI_Init(&argc, &argv);
std::vector<double> observing_times;
double tstart = 544276800;
double tend = 544276800 + 3600;
int number_of_images = 10;
double dt = (tend-tstart)/(number_of_images-1);
for (int i = 0; i < number_of_images; i++)
observing_times.push_back(tstart+i*dt);
std::string sed_image_fitted = "../../src/VRT2/DataFiles/2010_combined_fit_parameters.d";
std::vector<double> parameters;
parameters.push_back(0.2);
parameters.push_back(std::cos(M_PI/3.0));
parameters.push_back(5e7);
parameters.push_back(0.5);
parameters.push_back(0);
parameters.push_back(7.0);
parameters.push_back(0.0);
parameters.push_back(0.95);
parameters.push_back(0.99);
parameters.push_back(0.0);
double Nrays = 64;
movie.set_image_resolution(Nrays);
movie.set_screen_size(10);
movie.generate_model(parameters);
std::string basename = "orbiting_spot_frame_";
for ( size_t l = 0; l < observing_times.size(); ++l)
{
std::vector< std::vector<double>> I, alpha, beta;
movie.get_movie_frame(observing_times[l], alpha, beta, I);
std::stringstream movie_name;
movie_name << basename << l << ".d";
std::ofstream movout(movie_name.str().c_str());
movout << "Nx:"
<< std::setw(15) << alpha[0][0]
<< std::setw(15) << alpha[alpha.size()-1].back()
<< std::setw(15) << alpha.size() << std::endl;
movout << "Ny:"
<< std::setw(15) << beta[0][0]
<< std::setw(15) << beta[beta.size()-1].back()
<< std::setw(15) << beta.size() << std::endl;
movout << std::setw(5) << "i"
<< std::setw(5) << "j"
<< std::setw(15) << "I (Jy/sr)"
<< std::endl;
for (size_t m=0; m< alpha[0].size(); ++m)
for (size_t n=0; n <alpha.size(); ++n)
movout << std::setw(5) << n
<< std::setw(5) << m
<< std::setw(15) << I[n][m]
<< std::endl;
movout.close();
}
MPI_Finalize();