HEARSAY
Simulations for the probability of alien contact
The purpose of this project is to compute simulations of the causal contacts between emiters in the Galaxy.
The following lines show how to install and run an example simulation
suite. We assume that the package is downloaded in $hearsay_dir
and the
working directory is $working_dir
Clone hearsay from GitHub
cd $hearsay_dir git clone https://github.com/mlares/hearsay.git
Create a virtual environment for python
virtualenv -p $(which python3) MyVE source MyVE/bin/activate
Install the hearsay package
cd $hearsay_dir pip install .
Create a configuration file. A template can be found in
$hearsay_dir/set/experiment.ini
cd $working_dir cp $hearsay_dir/set/experiment.ini $working_dir
Edit the configuration file. Set the following values:
experiment_ID = run_001 dir_output = out dir_plots = plt
Create directories for output and plots, using the same values than the variables
dir_output0
anddir_plots
in the configuration file, for example:cd $working_dir mkdir out mkdir plt
create a file
experiment.py
that contains the following:from hearsay import hearsay from sys import argv conf = hearsay.parser(argv) G = hearsay.GalacticNetwork(conf) G.run_experiment() R = hearsay.results(conf) R.load() res = R.redux_1d() R.plot_1d()
A file with the name entered in the variable
plot_fname
of the configuration file will be saved in the directoryplt
.
Results from the simulations are stored in out/run_001/
directory, and can be read as follows:
from hearsay import hearsay
conf = hearsay.parser()
R = hearsay.results(conf)
R.show_ccns(ind)
where ind
is the simulation index, given by the line number in the file out/run_001/params.csv