The Quest for Good Color - 2. Spectral Profiles "On The Cheap"

this is so cool. thanks for the build instructions!

1 Like

The “Program FIles/MATLAB” folder for the version I am currently using (R2018B) uses 4.43GB of disk space, including Image Processing Toolbox, Optimization Toolbox and MinGW Compiler support.

Fantastic description of the building process !
Makes me wonder if I should start my own build :slight_smile:

1 Like

You should, you should… :smiley:

It’d be good to know how repeatable is this process. I’d also like to collect SSF data for more cameras. If you do take on the build, just keep safety in mind; the two power tools needed are relatively safe, but there are always ways of malign lurking to bite you. I need to add a safety warning to the instructions…

For sure, I’ll be careful, thanks for the advice :slight_smile:
I already have the required power tools and know how to handle them.
As a good European, I’ll have first to convert your measures in metric one and then try to find the furniture in local stores (or at least in stores that deliver in EU).

A small questions about the building process, maybe I missed it, but where does the 34 degrees angle comes from ? As I understand it, it comes from the diffraction grating specifications. If you have a 1200lines/mm does the angle change?

The angle for a 1200lines/mm grating would be 42 degrees.

Scroll back up to the first post for a supporting description. It’s around the animated GIF of the diffraction, essentially that angle produces a symmetric distribution of the spectrum around the mid-point wavelength of our concern, which is about 555nm.

This occurred to me as i wrote the instructions, but I don’t know what kind of equivalent wood is available in your neck of the woods. Let me know what you come up with, and i’ll rev the instructions to include them.

By the way, the critical measurement is the incident light angle we just discussed, next is probably the 12" length which has to do with how close the camera lens is to focus on the slit. After that, it’s mostly TLAR: That Looks About Right… :laughing:

I’ve only once found a case where Matlab had any significant benefit for my uses over Octave - it was because a particular tool written by another employee at my company who chose to use Matlab used a function still not reimplemented in Octave.

However, that tool was a nightmare to maintain and I eventually rewrote the entire damn thing in Python in the span of two weeks.

numpy + pandas + matplotlib is pretty powerful too, and easier to hook in to other Python components

There it is again, damned Python… :stuck_out_tongue_closed_eyes:

I guess I’ll have to dig out that text I almost threw away when I moved out of my office at school…

Yes, it seems that it is the flavour de la décade. I don’t mind it but I have the same problem with it that I have with Octave: it feels hacked and it requires effort to get and keep up and running. Non-programmers like me that would use it mainly for fast prototyping need stuff off the shelf that works off the bat, without having to invest time to assemble and maintain the software we use. I do realize that this goes against the open source credo, but as mentioned the price is imho more than reasonable for what it offers :wink:

The primary consideration is the tool that most facilitates your work. I’ll pay for a good tool, if need be…

What I find as a programmer is that most of the investigative tools make quick work of figuring out a problem, but sometimes data types and/or algorithms then require significant work to translate correctly to the “production environment”, which for me is now C++… (used to be Pascal, but where did that go…? )

For those of you looking to move to a new numerical computing language, I’d suggest taking a look at Julia. It’s a real pleasure to program in, and extremely fast too.

If you’re building the box, I need to recommend consideration of a small change. The camera is focused on the distance to the slit, and that 12" length may not be long enough to accommodate your lens’ min focus distance. Now, that min focus distance is measured from the focal plane, so take that into account.

My Z6 with the 24-70 f4 min focus distance is 0.3m, so I have a few cm to play with. However my D7000 with the 18-140 is 0.45m, so with that I’m right at the slit-focal plane distance. Time to pull out the macro lens…

That was one of my intentions. I currently have an old Nikon D90 with an all round 18-200mm lens. But the focus distance of that one is ~45cm (18in), and unfortunately, I don’t have a better lens (I’m planning to switch to a Z6 in the coming months :slight_smile: ).
I was also thinking about modifying the build to allow multiple lengths. Or even borrow Lego bricks from my kids to build the box.
Do you know if the inner color of the box could change the results ?

The light from the slit will reflect on the walls, hence the baffle. Painting the walls with flat black paint doesn’t help; it still reflects, but the baffle mostly takes care of it.

I’ve not painted the latest boxes; it seems that if you can get a clean spectrum surrounded by black, you can have bits of light around the edges of the image. I still try to minimize it, as a bright green pixel somewhere will vex the search algorithm in tiff2specdata.

I did my D50 with the 18-200, and I got a profile with max cc24 DE of 1.8. I’m looking at the lens as part of the optical chain to be characterized.

I’ve considered making the diffuser/slit positioning variable, just keep in mind you really need a port on the end that won’t leak light. That’s why my second design made the ends cover the entire box, including the lid. My first box end didn’t do that, and I spent all sorts of time trying to patch it so it wouldn’t leak…

We have a box of Lego “orphans”, bricks and parts that have been separated from their kit. I almost tried that, but I don’t own the contents of that box… :laughing:

1 Like

@ggbutcher , Thanks for such inspiring posts. I plan to build your spectrometer and create profiles for several cameras.

Did you post drawings or dimensions for your design online?

I am looking forward to getting camera profiles made with an RGB lightsource for use with Lightroom.


1 Like

Thanks for reading this far; if you’re going to build something, make sure you also read this:

And, somewhere in all this I posted instructions on how to build the spectroscope that works a lot better than the original one described in this thread. Here 'tis:

Camera_Profiling_Spectrometer-Build_Instructions.pdf (746.4 KB)

One of the design considerations for the new model was simplicity of construction; I got the use of power tools down to a radial arm saw and a drill. Please be sure you operate these machines safely, including getting some instruction from an experienced individual if you haven’t used either before.

The above post has links to all four posts in the series.


@ggbutcher Thank you for the instructions. I look forward to building and using it.

Your posts and design are beautifully detailed and described. Thank you!

1 Like

Let me know of any ambiguities or errors in the build instructions. I don’t write so good, sometimes… :crazy_face:

@ggbutcher I see that some spectrometer designs use a collimating lens between the slit and the grating.
Spectrometer with collimating lens

And other designs use a collimating mirror. Do you not need that because of the length of your box? Or did you leave it out because of cost? (The one I show above used a 50mm f/2 Pentax objective like old toys I have kicking around too).

Thanks again,

The diffusion filter accomplishes essentially the same thing.

Since the diffusion filter cuts a lot of light that’s helpful to doing a precise focus on the spectrum, this is one part I recommend using a proper filter rather than the paper.