BADASS3
BADASS3 copied to clipboard
Profile of spectrum is changed when fitting non-SDSS spectrum
Hello.
I want to use BADASS to fit non-SDSS spectrum, so I run non-SDSS code to fit SDSS spectrum as a test. I find the profile of spectrum is changed when resampling spectrum to log scale (blue line in following figure is the original SDSS spectrum but the red line is the profile that BADASS really fits), and fitting results are very different.
i think it is because option: flux is set of True when running function: log_rebin(badass.py):
the note of log_rebin said this option should be set of True to make sure of erengy conservation. But I think it only works if unit of spectrum is erg/s/cm^2. As our unit is erg/s/cm^2/AA, the integral flux would be conserved as long as the profile is not changed.
before log-rebin input spectrum, you use SpectRes to resample it to be linearly-binned if it is not. I find the profile is also not changed when SpectRes resamples SDSS data(log-binned) to linearly binned. And they also said their code can make sure of erengy conservation.
if I set this option(flux in log_rebin) of False, non-SDSS code provides very similar results to BADASS SDSS code.
So I think this option should be set of False.
what do you think about this?
I have actually run into this problem a few times but never considered how a difference in units might be the cause of change of the spectrum shape when flux is conserved. In any case, I would turn flux=False.
From: qinc2000 @.> Sent: Tuesday, November 15, 2022 3:41 AM To: remingtonsexton/BADASS3 @.> Cc: Subscribed @.***> Subject: [remingtonsexton/BADASS3] Profile of spectrum is changed when fitting non-SDSS spectrum (Issue #13)
Hello.
I want to use BADASS to fit non-SDSS spectrum, so I run non-SDSS code to fit SDSS spectrum as a test. I find the profile of spectrum is changed when resampling spectrum to log scale (blue line in following figure is the original SDSS spectrum but the red line is the profile that BADASS really fits), and fitting results are very different. [download]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F118250439%2F201863168-8c581b2d-d75a-4850-bd5b-f1c3685128f3.png&data=05%7C01%7Crsexton2%40gmu.edu%7Cb09c69eb47264d1528d608dac6e52cd6%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638040984870903611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=heRLk5lrPj26%2F%2BhYzTmqABcZpIgEhd9ttf%2BYmcPX%2Bxs%3D&reserved=0
i think it is because option: flux is set of True when running function: log_rebin(badass.py): [Screen Shot 2022-11-15 at 16 02 32]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F118250439%2F201862952-0a53ab65-4f15-40d2-8c7a-e849769be390.png&data=05%7C01%7Crsexton2%40gmu.edu%7Cb09c69eb47264d1528d608dac6e52cd6%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638040984870903611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aZ%2B1fY%2FpUmVRDyhKMNqfuoEAC4k9wH4qhy4w67kvcns%3D&reserved=0
the note of log_rebin said this option should be set of True to make sure of erengy conservation. But I think it only works if unit of spectrum is erg/s/cm^2. As our unit is erg/s/cm^2/AA, the integral flux would be conserved as long as the profile is not changed.
before log-rebin input spectrum, you use SpectRes to resample it to be linearly-binned if it is not. I find the profile is also not changed when SpectRes resamples SDSS data(log-binned) to linearly binned. And they also said their code can make sure of erengy conservation.
if I set this option(flux in log_rebin) of False, non-SDSS code provides very similar results to BADASS SDSS code.
So I think this option should be set of False.
what do you think about this?
— Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fremingtonsexton%2FBADASS3%2Fissues%2F13&data=05%7C01%7Crsexton2%40gmu.edu%7Cb09c69eb47264d1528d608dac6e52cd6%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638040984870903611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=udAwbRUj%2B4oirnwsVJENBgqOK%2FAgtsA1JTecj4pWSXM%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF7IPQDMB3VTTZ2BABTGOVLWINECJANCNFSM6AAAAAASAVSNL4&data=05%7C01%7Crsexton2%40gmu.edu%7Cb09c69eb47264d1528d608dac6e52cd6%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638040984870903611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UoxJxqjFiZ6IW%2B%2BxAZdNkwSjOEg%2FwxJp14uzH9%2F0cRI%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>
turn
OK, I see. Many thanks.