Cost and Licensing
Short answer? I’m a huge Hitchhiker’s Guide to the Galaxy fan.
The long answer is a little more complicated. Nightlight was written entirely by me in my spare time. It is an enormously complex project that was started in 2011 – six years from the first source code commit to the initial release (almost to the day). That’s calendar time – there were times where I worked evenings, weekends, and holidays, and others when I didn’t have a chance to work on the program for stretches up to six months. It’s difficult to estimate how much time it took to write Nightlight, but it a number easily measured in years.
Nightlight was not funded in any way by anyone. Early on, I considered applying for a grant to create it but was dissuaded to. I am familiar enough with the current environment of astronomical software to strongly doubt that it would have received any money, particularly before a single line of code was written. The years invested were from my own spare time while working full time at the Sloan Digital Sky Survey.
Currently, getting funding to write astronomical software lies somewhere between extremely difficult and impossible. Of course software for specific surveys and missions is written, but developing general purpose, community software is not a priority for any funding body. Community software continues to be written of course, but this is not meaningfully funded. (I wrote a paper about this which you can read here.) I’ve heard from more than one person that there is the opinion from at least of the main funding bodies that, “We haven’t funded astronomy software for many years now and it continues to be written, so why start now?” I consider Nightlight to be a high quality, polished piece of software. If something like this appears, for free, this argument will be borne out making it significantly harder for others to get funding for similar software.
Of course there is the argument that “software for science should be open source and free.” I completely agree with that sentiment – it should be. But software isn’t free to write – it takes an enormous amount of time, effort, and expertise. My time is not “free” – it is spent on my career, my (many!) interests and hobbies, and friends. Time that is not directly funded is spent against these other goals.Had this project been funded, I would strongly argue that it be open source and free. I agree that scientific software should be free to the users of that software, but that requires that the development of the software be paid for. We are not doing a good job of that in our community.
Nightlight was written primarily (though not exclusively!) to an audience of professional astronomers. It is intended to be used as a research tool to assist their work. As such, I strongly recommend that users of Nightlight seek reimbursement for the cost of the program from their institution or university. If Nightlight saves you time, helps you be more efficient, or makes your job easier, then it’s an eminently reasonable and modest expense to get reimbursed for.
I’m happy to continue the discussion about funding for astronomical software and welcome any comments, suggestions, or feedback. If you or your institution are interested in funding Nightlight, please feel free to contact me.
I don’t think you should be paying for software help you do your work. (I’m pretty sure that you didn’t pay for IDL out of pocket.) I strongly encourage you to get your department to reimburse this cost. This amount for a department (even a copy for everyone in the department) is negligible – this is less than a single day’s travel per diem in most places. Your department can afford it.
No. Nightlight was specifically written for professional astronomers, which means that nearly everyone would qualify for an academic discount. Those outside of that group (e.g. amateur astronomers) who want a FITS viewer should not be paying a higher price.
Licensing for Nightlight is handled through the Mac App Store, meaning I don’t have to implement or manage a licensing scheme. (Which I’m glad for as I’d rather spend the time adding new features.) Given the potential audience for the program is pretty small (professional astronomers who have Macs and regularly use FITS files), bulk discounts don’t make sense for me.
I designed Nightlight to support macOS 10.9 and above. When I was finally ready to release it (something I’ve been waiting years to do!), I could choose to take another week or two to test it on 10.9-10.11, or else release it for 10.12 and update the app afterwards. I will release updates to support older system versions as soon as possible.
I thought a lot about what the minimum number of features I would be happy with in the 1.0 version. Nightlight was written to answer the question, “What is in this FITS file?” without having to use a single line of code. To do that, it needed to display tables, images, and headers. It wouldn’t have been much use if you couldn’t scale, magnify, or see the WCS on 2D images.
I have years worth of features in mind that I would love to implement. However, for every feature I add, a user interface needs to be designed and written. It has to be tested not just on the macOS version I’m using, but on all versions I want to support (10.9+). Each feature I added to Nightlight pushed the first release date further out. I wanted to create a “minimum viable product” first, then release updates and features as frequently as I can.
The plus side of Nightlight not having been funded is that since you paid for it, you get to help decide what gets implemented next. I will be setting up a web site soon to submit and/or vote on requests. The community will prioritize new features, not any institution. (I reserve the right to put my thumb on the scales, though!)
My aim was to write a FITS viewer with the best possible user interface I could, and that can only be done as a native application. I wanted to take advantage of the rich, powerful frameworks available to a native platform (GPU acceleration, multithreading libraries, touch interfaces, etc.). Also, I had ready knew how to write Mac applications.
No. Writing Nightlight alone took six years (calendar time) to write. As an individual I don’t have the resources to even think about doing this – Nightlight has not been funded in any way. I’d be happy to talk to anyone who might be interested in funding versions for other platforms.
The Mac Sandbox
If you download a program from the internet and run it (Mac or command line), by default it has permission to do anything on your computer that you do. It can read your contacts, email, iPhone texts (if you haven’t turned on encryption), create a key logger, etc. Your iPhone doesn’t run this way – by default, no app you download can read any file on the device that it didn’t create itself. It lives in a “sandbox” that is separate from every other program. This provides a great deal of security on the platform.
Apple now requires that any program on the Mac App Store also lives in its own sandbox. When Nightlight, for example, asks the system for the user’s directory, it gets
/Users/demitri/Library/Containers/io.nightlightapp.io/Data/ instead of the expected
/Users/demitri/. It can only read files from or write files to that directory. All Mac App Store apps work this way.
Of course, you want to be able to read FITS files from anywhere on your machine. Nightlight performs a Spotlight search when it starts and finds all of the FITS files on your computer, but this doesn’t give it permission to read them. You must explicitly grant permission to read files that are not in Nightlight’s sandbox. Files it hasn’t received permission to read are marked with a red “no entry” badge. When you select the file, you will see a button to grant permission to read the file. Click it to open the file.
Luckily, you don’t have to. When you select a file you don’t have permission for, you will see a list of all of the folders above it that also contain FITS files. If you grant permission to read any folder listed, this will grant read permission to all files (recursively) underneath it. You may, for example, grant access to your home directory to extend permission to all files anywhere in your home directory. The point here is that YOU get to decide.
No. When you give Nightlight permission to read a directory, that permission persists to the next time you start the application. It will even keep track of the permission if you rename the directory.
No, you can’t. But if you grant permission to a high enough directory (e.g. your user directory), you won’t really be aware it’s there. On the now hand, I disliked having to support the sandbox (it easily delayed the app’s release by six months), but on the other hand I like that every other app that I download has the same restrictions.