{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/3391","labels_url":"https://api.github.com/repos/astropy/astropy/issues/3391/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3391/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/3391/events","html_url":"https://github.com/astropy/astropy/issues/3391","id":55921596,"number":3391,"title":"Problems with redshifted Gaussian example in compound model docs","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/Docs","name":"Docs","color":"02d7e1"},{"url":"https://api.github.com/repos/astropy/astropy/labels/modeling","name":"modeling","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-01-29T16:27:31Z","updated_at":"2015-02-04T17:29:28Z","closed_at":null,"body":"One of the model composition examples (see https://astropy.readthedocs.org/en/latest/modeling/compound-models.html#model-composition) implements a `RedshiftedGaussian` model.  However, there are two issues.  First, the Gaussian appears to be *blueshifted* instead of redshifted, assuming the currently unlabeled (it should be labeled) x-axis is wavelength (see https://astropy.readthedocs.org/en/latest/modeling/compound-models-1.png).  The green `z=0` Gaussian appears to be at the largest wavelength (and the line is broadest).\r\n\r\nThe second issue is more subtle, but important.  Redshifting a spectrum/emission line, etc. involves more than just transforming the wavelengths.  There needs to be a corresponding transformation to conserve flux, e.g. wave' = wave * (1 + z) **and** flux' = flux / (1 + z).  Again looking at the \"redshifted\" Gaussian figure, notice that the integrated line flux is changing with redshift because the line width is changing.  There needs to be a corresponding amplitude change to conserve integrated flux.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/72898805","html_url":"https://github.com/astropy/astropy/issues/3391#issuecomment-72898805","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3391","id":72898805,"user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T17:29:28Z","updated_at":"2015-02-04T17:29:28Z","body":"@nden That would also be nice to have *in general* and is certainly welcome.  Though I don't think it would serve as an alternative to this specific example.  My goal there was to have a very simple 1-D model composition example.  Following it up with more complicated 2D examples (there is already one after it involving rotations, for example) is fine but wasn't the purpose of this example."}}