Package: pystartrails
PyStarTrailsPhotographers and astrophotographers can use this package to quickly and easily generate star-trail images from a sequence of images in order to create stunning images of the night sky.The previous image-processing software I used was Adobe Photoshop, a powerful image-processing program that can be used for the generation of star trails. However, I experienced slow computer performance after uploading a star trail image sequence (more than 500 images) since my RAM became overloaded with images. I was forced to divide the 500 images into small batches. This process took a considerable amount of time.Due to this, I have decided to develop a lightweight and fast python package that does not require the installation of any external programs. I hope that this package will be useful for all astrophotographers and photographers worldwide :)Developed byYassir LAIRGI©2022.InstallationThe PyStarTrails package can be installed through pip:pipinstallpystartrailsUsageThis package assumes that you have already a sequence of night sky images that you want to create a star-trail image based on. In order create your first star-trail image, specify :frompystartrailsimportTrailsGeneratortrails_generator=TrailsGenerator(sequence_repository,generated_img_repository,generated_img_extension,generated_img_name)star_trail_img=trails_generator.generate_trails()Where:sequence_repository (str) : the image sequence repository (please be sure that your images have the same shape).generated_img_name (str) : the name of your generated image (star trailed image)generated_img_extension (str) : the extension of your generated image (either "JPG", "JPEG" or "PNG")generated_img_repository (str) : here you specify where you want to save your generated trailed image. By default, the generated image is stored in the sequence repositorygenerate_trails() method returns array in the same format as the input format and in the same time saves the generated image in the specified generated_img_repository.ExampleThis example is structured structured in three parts:Prepare the folder of your night sky image sequence. This repository is actually the sequence_repository attribute of TrailsGenerator class.Choose the generated image extension and where you want to save it (otherwise, it will be stored by default in the sequence repository).Generate your star trail image. AND ENJOY :D.frompystartrailsimportTrailsGenerator# Initialize the TrailsGenerator classtrails_generator=TrailsGenerator(sequence_repository="../data/raw/",generated_img_extension="JPG",generated_img_name="trailed_img")# Generate trailsstar_trail_img=trails_generator.generate_trails()"""OUTPUT100%|██████████| 10/10 [00:04<00:00,  2.17it/s]"""You could also show the generated img using matplotlib.importmatplotlib.pyplotaspltplt.imshow(star_trail_img)plt.show()DependenciesThe PyStarTrails package needs the following packages :matplotlibNumPyOpenCVtqdmSee AlsoAll my star trail images were generated using this package. You could check my Instagram accountYassir LAIRGI.ContributionFeel free to contact me via the Issues tab on GitHub if you would like to contribute or provide feedback.LicensePlease note that the PyStarTrails package is distributed under the MIT License (MIT).