I am leading a project for my High School NASA Club, and am looking for some advice. The goal of our project is to use a Raspberry Pi to control a camera that takes photos of the sky, and uses the photo to calculate sky glow, and create a map of where it in the sky is there the most sky glow. After calculating sky glow the device would add it to a plot that shows how sky glow varies throughout the year, and creates a nightly twitter post rating the night for Astronomy. I currently have working code that when given a picture, it will convert down to greyscale, and then find the brightness map, and find an average sky glow. The part that I am stuck on is in figuring out what kind of camera to use. I don't know if the RPi camera module would work for taking photos of the stars, or if I would be better suited using a USB webcam with it. I am not sure what factors are important in this decision at all. Also, once the camera is set up, what would be the best process for calibrating it to get values that agree most closely with accepted ones? I couldn't decide if this should go on the Astronomy, Raspberry Pi, or Photography Stack Exchange, but I chose this one since sky glow may be something astronomers calculate a lot. Thank you for your help.
I would recommend the PiNoir Camera. Since it has no IR-filter attached, it's perfectly made for nightly observations. If you need the Raspberry just to calculate Skyglow in general, you could try to collect all light and bundle it to a beam, then measure its intensity.
What also came to mind is: When calculating the rating of the night, or a point in the sky, consider moon phases in your calculations. A bright and full moon will significantly raise average sky-glow and vice versa.
Well, light, and the resulting sky glow comes in a lot of different wavelengths, so the first question you need to ask yourself is what range are you looking for? If this project is intended to give someone a good idea as to whether it is worth their while to drag out the telescope on a given night, chances are you only care about human visible wavelengths (but don't underestimate the amateur radio astronomers in your area!). My phone's camera will pick up light in the near-infrared, so you want to be careful.
Secondly, you need a camera with very low noise. If you go into a windowless room with the lights off, and take a picture, you want to have as close to 0x000000 rgb measurement from every resulting pixel as possible. A magnitude 0 star will only produce 2.08 microlux, so electrical noise can alter your results significantly.
Third, and this may be obvious, make yourself a cardboard "horizon shield" (a name I made up) to block any direct sources of light.
And if it isn't of vital importance to use an actual camera, since you are using a raspberry pi, you might just want to go with a lux meter instead. This one has a separate meter for the human visible wavelength, and the noise should be very low, depending upon how you wire it and what voltage you supply.