GalSim-developers / GalSim-Euclid-Like

Helper functions to generate simulations of Euclid-Like images.
Other
1 stars 0 forks source link

figure out where noise is handled (within or outside euclidlike-imsim) #54

Closed rmandelb closed 2 months ago

rmandelb commented 3 months ago

"For the run Axel did, to get the weight I run the simulation twice, once with run and once without to get a noise-only image. Also, when the noise is not applied the gain is not applied either. We need to talk about this. Maybe Troxel have some insight? I don’t know if can produce within imsim image with noise + image without noise + weights + noise-only"

rmandelb commented 3 months ago

Start by asking Troxel

aguinot commented 3 months ago

Hello @matroxel,

We have a question regarding how we should handle the noise for the simulation. I modified the imsim code to make it generate noisy images but the issue II have is that it only create a science image with noise on it but I don't have access to noise/background field. Do you know if it would be possible to oputput more than one image from imsim? Or do we need to have a separate script like in roman_imsim to handle the noise at posteriori? Thank you!

matroxel commented 3 months ago

This is the main reason I hadn't integrated that part into the config code yet. You'll need to write a new output class to do it.

aguinot commented 3 months ago

This is the main reason I hadn't integrated that part into the config code yet. You'll need to write a new output class to do it.

Ok, I can look into that. Just to have a starting point, I found a file called scafile.py where you have defined a class (here):

class SCABuilder(OutputBuilder)

Is this what you are referring to?

What would the config file looklike? Would I just need to add a line like:

output:
    type: CCDFileBuilder
    nfiles: 1
    dir: ...
    [...]
matroxel commented 3 months ago

Yeah, that was my abandoned start probably. I'm not really sure, since I didn't get that far.

aguinot commented 3 months ago

Ok, I'll have a look in LSST imsim to see how it works. Thank you!