simonsobs / fgspectra

Foreground SED and power spectrum library for building cross frequency power spectrum models
BSD 3-Clause "New" or "Revised" License
8 stars 7 forks source link

Model for the power from radio sources as a function of the flux cut #21

Open dpole opened 5 years ago

dpole commented 5 years ago

We have received a request for this model, but details are not clear. To potential users, please express any need that could be not obvious (or feel free to mark down also the obvious ones). To radio sources experts, please provide information about the functional form (and, of course, the parameters) that we should use in the implementation Thanks!

ajvanengelen commented 5 years ago

I have a routine that does this for the Tucci et al 2010 C2EX model, which is the model used by the ACT team for this purpose. I am happy to write it into the fgspectra library. It would be helpful for someone who is already working with this package to write a function prototype (i.e. just the definition line for the routine) so that it meshes with the rest of the software in the package,

dpole commented 5 years ago

Great, thanks. We are finalizing the API in these days. Once we are done, I'll prepare a prototype for you. In the meanwhile people should feel free to provide further inputs.

ajvanengelen commented 5 years ago

Sounds great! Like I said in an earlier email, what I have boils down to maybe three or four lines of code, so the work will really be in just setting up the structure to put it into the right place.

erminiacalabrese commented 5 years ago

Hi both, sorry for being late in responding. People are requesting the ability of predicting radio power given a specific flux cut. Alex you have code for it and in terms of interface with fgspectra this should simply predict the amplitude of the radio sources which would enter as one of the parameters of the full foreground model.

dpole commented 5 years ago

Hi, we have converged on the API (and also the internal structure). We can now prepare a template for this component. In order to do that, we need to know something about the model. In particular, it is important to understand if you can factorize the multipole dependence and the frequency dependence. @ajvanengelen or someone else, can you give us some information in this respect?

erminiacalabrese commented 5 years ago

Yes, these sources are just shot noise, so a flat Cl (ell(ell+1)/2piCl in Dl) and scale in frequency with a beta=-0.5 .

dpole commented 5 years ago

So the only variable is the Cl value as a function of the flux cut?

erminiacalabrese commented 5 years ago

The variable is the amplitude of Cl at ell=3000 (which can be predicted for a given flux cut) but varies as free amplitude for the CMB likelihood. The frequency index can be fixed for now.

ajvanengelen commented 5 years ago

Hi Erminia,

For SO, will the point source mask be the same at all frequencies, and will it be determined from the sources found at a single frequency?

Alex

On 2019-06-13 11:37 a.m., erminiacalabrese wrote:

The variable is the amplitude of Cl at ell=3000 (which can be predicted for a given flux cut) but varies as free amplitude for the CMB likelihood. The frequency index can be fixed for now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/simonsobs/fgspectra/issues/21?email_source=notifications&email_token=ADYBOHFUP3XAQTP42NYFYFLP2JSS5A5CNFSM4HVHJM2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXUDENA#issuecomment-501756468, or mute the thread https://github.com/notifications/unsubscribe-auth/ADYBOHF7F5MIB6OVZQBYGFLP2JSS5ANCNFSM4HVHJM2A.

erminiacalabrese commented 5 years ago

I don't know yet. We could think of implementing some automatic calculation going via flux cut but for now I'd keep it simple and give people the option of doing predictions but also varying an amplitude.

dpole commented 5 years ago

In this case we don't need any special tool. We just have to combine a power-law SED with a white cl. We only need the latter, I can take care of it.

ajvanengelen commented 5 years ago

Yes, you just have to integrate over the number of counts at each flux level to get the amplitude of the white C_l.

Alex

On 2019-06-13 11:51 a.m., Davide Poletti wrote:

In this case we don't need any special tool. We just have to combine a power-law SED with a white cl. We only need the latter, I can take care of it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/simonsobs/fgspectra/issues/21?email_source=notifications&email_token=ADYBOHG3K3M2LMU4YUXQKODP2JUJDA5CNFSM4HVHJM2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXUESPY#issuecomment-501762367, or mute the thread https://github.com/notifications/unsubscribe-auth/ADYBOHGAY4OEOOOW3LIGRHLP2JUJDANCNFSM4HVHJM2A.

erminiacalabrese commented 5 years ago

Exactly, and that can then be used for dusty sources and radio sources separately.

dpole commented 5 years ago

Ok, so I think we should implement two separate models. One that takes the amplitude of the white spectrum as a free parameter and the another that takes the flux cut as free parameter. Right? I can easily take care of the former and prepare the skeleton of the latter

jcolinhill commented 5 years ago

Just to check, this should be a power-law in flux units, right? (c.f. Sec. 2.5, Eq. 13 of Dunkley et al 2013) It seems like the power-law implementation in fgspectra currently assumes a power-law in RJ temperature units.

dpole commented 5 years ago

Right, thanks for pointing this out. In this case it is just a redefinition of beta, but we should double check the units for components we recently added

giuspugl commented 4 years ago

Also , I have available radio sources number counts from 2 to 150 GHz , I've used them for Polarbear . can share with you guys if needed.

msyriac commented 3 years ago

@giuspugl do you maybe have code for the power spectra that you could contribute here?

giuspugl commented 3 years ago

Isn't it what I have already implemented in #34 ?

msyriac commented 3 years ago

Ah missed it, great!

dpole commented 3 years ago

Thank you Peppe. We should then proceed and merge PR #34 I had a look at your code, I think that before merging

Please @msyriac, and anybody else, confirm that this is OK (and @giuspugl confirm that I'm understanding your code correctly) -- a thumb up is enough. Thanks!

giuspugl commented 3 years ago

Yes the function estimate_autospectra does exactly that .

Not sure what you mean here by the sources at different frequencies are assumed 100% correlated.

msyriac commented 3 years ago

I couldn't find an example or test in #34 to see how the API is meant to be used ; could you add one for the auto and cross?

dpole commented 3 years ago

@msyriac , as I mentioned before, the api should probably change, for coherence with the rest of the library.

@giuspugl , the power in a cross spectrum is the product of the sqrt of the power in the two autos. This is correct if the sources at the two frequencies are exactly the same and have all the same scaling with frequency

giuspugl commented 3 years ago

@dpole For time being the cross spectra implemented are related to the flux cuts and the observed SED of radio sources. In https://github.com/giuspugl/fgspectra/blob/edc014a42047b02327a7ceaaf61cea8fbdad7c5c/fgspectra/frequency.py#L167, you can see the current implementation which essentially doesn't rely on the assumption of having the sources 100% correlated, i.e. cross spectrum != product of the sqrt of the power in the two autos. Of course we can discuss if this is a feature we want to include..