-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generating mock data #1
Comments
Hi Jason,
Sorry for the late reply. tuto.py was working when I first wrote it. But it may have been outdated with never versions of the code base. Let me check this week and get back to you.
As for generating mock data, you basically need to call pcat.main.init() without any input data file (i.e., without setting strgexpr). This will force PCAT into simulated-data mode. It will generate a mock dataset from a 'true model', which has default values for all of its parameters. So you can change these defaults by setting the relevant argument to pcat.main.init() (e.g., trueXXXX, where XXXX is the name of the parameter of the true model).
Note that you still need to specify the argument strgexpo (in order to define exposure — could be a string with the name of a fits file, or a single float number if exposure is constant) and background template(s).
Best,
Tansu
… On Sep 10, 2017, at 8:11 AM, jasonfan1997 ***@***.***> wrote:
I am trying to generate some mock data of fermi but i have no idea about the procedure of it. Also , I want to know if the tuto.py working or not because I face some error when run it. What kind of file do I need to prepare if I try to generating mock data? Would you please kindly show me the steps?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#1>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKP9BgSqnf_uW-UYtLmv4PTb8XJR8TU0ks5sg9IOgaJpZM4PSTJB>.
|
Hi Tansu Thank you for your reply, but I have faced a new problem when I try to run pcat.main.inti(). PCAT v0.3 started at 20170923_211940 File "", line 1, in File "/home/jason/anaconda3/envs/py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 688, in runfile File "/home/jason/anaconda3/envs/py27/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 93, in execfile File "/home/jason/pcatproject/temp.py", line 22, in File "/home/jason/anaconda3/envs/py27/lib/python2.7/site-packages/pcat/main.py", line 513, in init ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() |
After I add .any() at the back, it work. But a new problem come out is this line when I run tuto.py |
Hi Jason,
I see. adis.h5 (along with adiscoef.h5) are files that contain the angular diameter distance as a function of redhisft, which allow the user to associate sky (i.e., angular) distances to physical distances for a given redshift. I should have made it optional, though, because currently it is only useful for strong lensing. I am attaching these files (to be put in $PCAT_DATA_PATH/inpt) so it won’t complain.
I pushed a new version of PCAT that should solve any issues with tuto.py. You can just
git pull pcat
to get the development version.
Thanks!
Best,
Tansu
… On Sep 23, 2017, at 9:48 AM, jasonfan1997 ***@***.***> wrote:
After I add .any() at the back, it work. But a new problem come out is this line when I run tuto.py
fileh5py = h5py.File(gdat.pathdata + 'inpt/adis.h5','r')
which do not exist
I have no idea what adis.h5 is
can you kindly explain? Thank You
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AKP9BqGY-D37cSa3zhunx0xdGVxP3OSCks5slQwigaJpZM4PSTJB>.
|
Hi I still getting the same error after I pull development version pcat. Best |
I am trying to generate some mock data of fermi but i have no idea about the procedure of it. Also , I want to know if the tuto.py working or not because I face some error when run it. What kind of file do I need to prepare if I try to generating mock data? Would you please kindly show me the steps?
The text was updated successfully, but these errors were encountered: