This entry is part 2 of 3 in the series Night Photography

Well, not too much background noise at least!

I love photos, and I’m beginning to get into astrophotos as well. One issue I face is how to get long exposures from the sky when you have light noise. I want to see arcs in the sky, but the longer you expose, the brighter the background becomes. The same problem occurs if you are using a polar tracker, you get more light, but also more noise!

So I decided to get a small script together to generate images like this one:

58 stacked photos
58 stacked photos, all captured for 20s on a Canon R6 + 28-70 at 28mm/f2

It feels a little bit artificial because the noise is minimal and because there are not that many small stars, but it’s a good start. The script is very easy, it just reads all images from the command line pattern, and then gets the maximum pixel value for all pixels across these images. Saving in “result.jpg”, and this is it!

# -*- coding: utf-8 -*-
import glob
import sys
import numpy as np
from PIL import Image
def readFiles(images):
loaded = [np.asarray(Image.open(img)) for img in images]
return np.array(loaded)
if __name__ == "__main__":
r = np.max(readFiles(glob.glob(sys.argv[1])), axis=0)
Image.fromarray(r).save("result.jpg")
view raw astro.py hosted with ❤ by GitHub

The script doesn’t try to align images at all, as we want to see the arcs (at least I want to!), so to use this script, you need to capture many images on a tripod and a remote control.

Anyway, easy, there may be other small scripts like this in the future, who knows.

Buy Me a Coffee!
Other Amount:
Your Email Address:

I’m a huge fan of home automation. I started studying the KNX standard more than a decade ago, and I wanted to automated everything in my home. One day.

In the last decade, we saw the apparition of lots of new standards, not just for lighting and heating, but also for everything else. Unfortunately, it’s rarely compatible with each other. I saw a few projects int he fast, and recently saw HomeAssistant in an article, and decided to try it.

Read More

While I was reading an article on Google last Deep Learning achievement, I was reminded of a previous discussion with former colleagues about replacing reservoir simulations with neural networks. At the time, I dismissed the idea as ridiculous due to the complexity of the task and the requirement for the training.

But now, Google seems to have done it. Or have they?

Read More

On my quest for a good Flask book, I saw this book from Tarek Ziade. We are more or less of the same generation, both from France and he wrote a far better introductory book to Python in French than mine. He also founded the French Python community (AFPY), so I always had a huge respect for the guy. And the book was appetizing.

Read More