{"action":"created","issue":{"url":"https://api.github.com/repos/desihub/desisim/issues/386","repository_url":"https://api.github.com/repos/desihub/desisim","labels_url":"https://api.github.com/repos/desihub/desisim/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/desihub/desisim/issues/386/comments","events_url":"https://api.github.com/repos/desihub/desisim/issues/386/events","html_url":"https://github.com/desihub/desisim/issues/386","id":338238652,"node_id":"MDU6SXNzdWUzMzgyMzg2NTI=","number":386,"title":"quickquasars simulated spectra can not be reproduced","user":{"login":"andreufont","id":3873863,"node_id":"MDQ6VXNlcjM4NzM4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3873863?v=4","gravatar_id":"","url":"https://api.github.com/users/andreufont","html_url":"https://github.com/andreufont","followers_url":"https://api.github.com/users/andreufont/followers","following_url":"https://api.github.com/users/andreufont/following{/other_user}","gists_url":"https://api.github.com/users/andreufont/gists{/gist_id}","starred_url":"https://api.github.com/users/andreufont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreufont/subscriptions","organizations_url":"https://api.github.com/users/andreufont/orgs","repos_url":"https://api.github.com/users/andreufont/repos","events_url":"https://api.github.com/users/andreufont/events{/privacy}","received_events_url":"https://api.github.com/users/andreufont/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"LuzGarciaP","id":18243157,"node_id":"MDQ6VXNlcjE4MjQzMTU3","avatar_url":"https://avatars3.githubusercontent.com/u/18243157?v=4","gravatar_id":"","url":"https://api.github.com/users/LuzGarciaP","html_url":"https://github.com/LuzGarciaP","followers_url":"https://api.github.com/users/LuzGarciaP/followers","following_url":"https://api.github.com/users/LuzGarciaP/following{/other_user}","gists_url":"https://api.github.com/users/LuzGarciaP/gists{/gist_id}","starred_url":"https://api.github.com/users/LuzGarciaP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuzGarciaP/subscriptions","organizations_url":"https://api.github.com/users/LuzGarciaP/orgs","repos_url":"https://api.github.com/users/LuzGarciaP/repos","events_url":"https://api.github.com/users/LuzGarciaP/events{/privacy}","received_events_url":"https://api.github.com/users/LuzGarciaP/received_events","type":"User","site_admin":false},"assignees":[{"login":"LuzGarciaP","id":18243157,"node_id":"MDQ6VXNlcjE4MjQzMTU3","avatar_url":"https://avatars3.githubusercontent.com/u/18243157?v=4","gravatar_id":"","url":"https://api.github.com/users/LuzGarciaP","html_url":"https://github.com/LuzGarciaP","followers_url":"https://api.github.com/users/LuzGarciaP/followers","following_url":"https://api.github.com/users/LuzGarciaP/following{/other_user}","gists_url":"https://api.github.com/users/LuzGarciaP/gists{/gist_id}","starred_url":"https://api.github.com/users/LuzGarciaP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LuzGarciaP/subscriptions","organizations_url":"https://api.github.com/users/LuzGarciaP/orgs","repos_url":"https://api.github.com/users/LuzGarciaP/repos","events_url":"https://api.github.com/users/LuzGarciaP/events{/privacy}","received_events_url":"https://api.github.com/users/LuzGarciaP/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-07-04T11:28:44Z","updated_at":"2018-07-06T23:07:57Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I can not reproduce the simulated spectra, even when passing a random seed. For instance, when I run the simple code below.\r\n\r\n``\r\n#!/bin/bash\r\n\r\ndownsampling=0.40\r\noutdir=/project/projectdirs/desi/mocks/lya_forest/london/v2.0/test_quick/v0\r\ninfile=/project/projectdirs/desi/mocks/lya_forest/london/v2.0/0/0/transmission-16-0.fits\r\n\r\nquickquasars --exptime 4000. -i $infile --zmin 1.8 --outdir $outdir/spectra-16 --downsampling \r\n$downsampling --zbest --mags --desi-footprint --seed 123\r\n``\r\n\r\nMoreover, we need to make sure that we are able to run two simulations that are identical in any way, except adding a new artefact. This means that we should be able to add DLAs or not, without this changing the random numers for the quasar continua or for the instrumental noise.\r\n\r\nI belive we can easily accomplish this by resetting the random number generator, using the seed that has been passed, every time we need to generate numbers at a different part of the code. We don't care if the random numbers in continuum and in noise are correlated, as lonf as they are different in different quasars. Right?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/desihub/desisim/issues/comments/403167290","html_url":"https://github.com/desihub/desisim/issues/386#issuecomment-403167290","issue_url":"https://api.github.com/repos/desihub/desisim/issues/386","id":403167290,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzE2NzI5MA==","user":{"login":"alxogm","id":14896082,"node_id":"MDQ6VXNlcjE0ODk2MDgy","avatar_url":"https://avatars0.githubusercontent.com/u/14896082?v=4","gravatar_id":"","url":"https://api.github.com/users/alxogm","html_url":"https://github.com/alxogm","followers_url":"https://api.github.com/users/alxogm/followers","following_url":"https://api.github.com/users/alxogm/following{/other_user}","gists_url":"https://api.github.com/users/alxogm/gists{/gist_id}","starred_url":"https://api.github.com/users/alxogm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxogm/subscriptions","organizations_url":"https://api.github.com/users/alxogm/orgs","repos_url":"https://api.github.com/users/alxogm/repos","events_url":"https://api.github.com/users/alxogm/events{/privacy}","received_events_url":"https://api.github.com/users/alxogm/received_events","type":"User","site_admin":false},"created_at":"2018-07-06T23:07:57Z","updated_at":"2018-07-06T23:07:57Z","author_association":"CONTRIBUTOR","body":"So I've seen that spectra are reproduced if no noise is added. in line https://github.com/desihub/desisim/blob/9df332d970b2e32ffb26f4c7a4203df745896bb9/py/desisim/scripts/quickspectra.py#L197\r\n\r\nAs well as if I increase the exposure time,   the differences gets much smaller as can be seen in the current version of the notebook  https://github.com/desihub/desisim/blob/fix_dlabugs/etc/quick_quasar.ipynb\r\n\r\nAlso checked that the status of the random generator status is the same for all runs  up to line \r\nhttps://github.com/desihub/desisim/blob/9df332d970b2e32ffb26f4c7a4203df745896bb9/py/desisim/scripts/quickspectra.py#L181\r\n\r\nHowever funny things happen  in\r\nhttps://github.com/desihub/desisim/blob/9df332d970b2e32ffb26f4c7a4203df745896bb9/py/desisim/scripts/quickspectra.py#L182\r\n\r\nlike if I pass a seed number explicitly here, the difference between the dla random/no_dla was smaller, but not for any number I pass :S \r\n\r\n@julienguy any idea  on how to fix it?  or how can I load a local version of the specsim from the notebook? (or from command line)   I haven't been able to do it as I do with desisim or redrock, therefore I can't continue dig in into it... "}}
{"actor":{"display_login":"alxogm"}}