Scraping the Bayer, Gain or Loss? – A quantitative analysis of mono-mod sensitivity

When you are deep into astrophotography, you’d probably start doing monochromatic deep sky imaging. A typical choice would be cooled CCD imager. These CCD cameras come in a variety of size format and architecture. The most affordable are interline CCD offered by Sony and Kodak (now ONSemi). Then the expensive full frame CCD requiring mechanical shutter from Kodak. Now however, as most of my previous posts and other similar studies have pointed out, CMOS holds a much better edge comparing to CCD. The only problem is, not a lot of CMOS based monochromatic devices are out there for your choice.

CMOSIS CMV12000

One option is the sCMOS from EEV and Fairchild. But I would imagine those to be expensive. Then CMOSIS who offer global shutter ones with monochrome in various format. But their dark current (~125 eps) and read noise (>10e-) figures are not a clear competitor to CCD in any way. Sony makes small format B/W CMOS but nothing bigger than 1 inch format. As such, we saw many specialized conversion service that scrape away the Bayer filter layer these years. Unfortunately, by doing so, you essentially remove the microlens array which boost the quantum efficiency. So in this post, I’m going to investigate the QE loss and gain with such modification.

Data is kindly provided by ChipMod for this study.

The modification steps involve camera disassembly, filter stack removal, followed by prying open the cover glass, protecting the bonding wire and finally scratching the pixel array. For the last step, the scratching actually happens in layers. We’ll use IMX071 cross section EM image from Chipworks again for illustration.

image

The surface texture of an image sensor, as described by ChipMod, varies in resistance to scratching. The first layer to come off, are the microlens array indicated in green arrow. This layer is usually made of polymer. Further applying force would strip away the RGB Bayer filter as well, indicated by the red arrow. The yellow region represents the pixel pitch with the blue defining the photodiode boundary. Comparing the length of blue to yellow, we could estimate the fill factor is 50%. Because of the channel stop, overflow drain on the other axis, the fill factor is typically 40%. The gapless microlens above, focus the light rays onto the photodiode to bring the fill factor close to 90%.

image

The sensor was scraped into 3 vertical regions. From top to bottom, A: the microlens array is removed; B: both layer removed and C: the original one. Comparing A/B tells you how much light the color dye absorbs at that wavelength. A/C tells you how effective are microlens. Finally, B/C gives you the gain/loss after mod.

An identical test condition was set up with a 50F6.5 ED telescope in front of a white screen. 2 wavelength, Ha and Oiii are tested with 7nm FWHM filter in the back. Field is sufficiently flat so center regions are used to calculate mean intensity.

image

Test result

The microlens array performs as expected, it typically boost QE to 2x in native channels. Even in non-native color channel, the uLens still boost signal by 50% or more. Losing the uLens array is a major downside. But considering the absorption of color dye even in its peak transmission, stripping CFA actually minimize the QE loss. For example, in the red channel of H-alpha, signal was at 64% even though losing the uLens should impact the QE by more than half. The same is more apparent in Oiii wavelength. Because green channel peaks at 550nm, at 500nm the absorption is nearly half for this particular sensor. Thus the net result is no different from the original sensor.

In conclusion, mono-mod sacrifices some QE for resolution and all spectrum sensitivity. My estimation puts final peak QE at around photodiode fill factor, or around 45%. The state of art CMOS process maximized the photodiode aperture, making such mod less prone to loss of QE after microlens removal. This is in vast contrast with Kodak interline CCD structure where a 5 fold QE penalty should microlens are stripped away. The mod should perform well for narrowband imaging, especially for emission nebulas. However, a fully microlensed monochromatic sensor is still preferred for broadband imaging.

IMX071 Characteristics

The IMX071 is the CMOS imaging sensor on Nikon D7000 and D5100. After almost 2 years of work, we have found the register controlling the black level and the patch is available for both D5100 and D7000. As expected, the register is part of the EXPEED Image Processor, not on sensor. With more tweaking on the EXPEED preprocessing switch, we discovered the optical black region is also filtered to get rid of hot pixel and pattern noise. Digital gain above ISO1000 and color channel scaling could also be turned off.

Much work has been done to understand the sensor SPI protocol as well. So far, a register controlling the average black level after digitalization is discovered. There’s another set of 4 registers controlling the analog gain for each color channel. The camera faithfully issues the same gain setting for each ISO no matter the exposure length, thus linearity should be ideal.

Based on these work, a more accurate test on the sensor can be done again. Here’s a sensor characteristic test using data obtained by service mode hack and later disabling the internal image pre-processing.

Area Definition

The mod will also turn on image sensor overscan, where the periphery dummy pixels and optical black pixels are included in the NEF image.

Total Area: 0, 0 – 5054, 3357

Virtual Dummy: 0, 0 – 5039, 11 (Blank ADC runs, very low readout noise)

Dummy Pixels: 0, 12 – 5039, 35 & 4960, 36 – 5039, 3357 (Pixel readout without dark current, for bias level estimation)

Optical Black: 0, 36 – 4959, 3357 except 2, 70 – 3, 3357 & 4956, 70 – 4957, 3357 (Dummy pixels) and effective pixels

Effective Pixel: 4, 70 – 4955, 3357

Offset to non-overscan: 8, 74

The column 5040..5054 are the horizontal blanking region and it outputs a constant value. The dummy pixels don’t seem to have a photodiode, hence not dark current but only read noise is recorded. However, dummy pixels should not be used for read noise estimation. The optical black pixels are actual pixels with light shielding, and they can be used for read noise and dark current estimation.

Testing Procedure

First, a pair of images is taken with same exposure setting against a flat lighting source. A LCD panel display with 4 layer of parchment paper is used as uniform light source. Then the RAW image is split into 4 separate CFA channel and a center 256 x 256 uniform region is cropped.

Image pair

The average pixel value and standard deviation are recorded.

Subtract

Then the second image is subtracted from the first one, taking away the variance caused by PhotoResponse Non-Uniformity (PRNU). The rest of the variance will be the double of summation from photon shot noise, dark current shot noise and read noise. Since the shutter speed is relative fast – 1/6s, thus we ignore the dark current.

2x Std EV

The read noise can be calculated from the optical black region with the same subtraction. Then the variance of read noise is subtracted from the rest.

Test Result

Gain

The following table illustrates the more accurate sensor characteristics under ISO100 and ISO320. Note that with the patch, sensor is using the default analog gain setting instead of calibrated ones. Thus ISO100 is more like ISO 80 compared to factory setting. Also note that “DEV 2”s are the summation of 2 deviation resulting from image subtraction.

D7000-Gain

The sensor pretty much behaves “ISO-less” with identical read noise. A little elevated read noise at base ISO is likely due to quantilization error from ADC at such a low gain. PRNU may not be accurate enough since I did not use a diffuser. Flatness is achieved by manually picking a 512×512 section from image with the most uniformity.

Read Noise

To further characterize read noise at ISO320, I used an in-house tool to take 64 bias frames without shutter actuation, much like the in camera Long Exposure Noise Reduction (LENR). The images are then converted to TIFF and imported into R Studio for analysis. For one channel CCD, all pixel went through a single output amplifier, thus read noise is identical. However this is not true for CMOS where each pixel has its own amplifier, and each column has its own CDS and ADC circuit. To address this, I calculated the standard deviation for each pixel and plot its distribution. Ideally, each pixel will have a different gain in a best mathmatical model. But measuring it with the current setting is difficult. Under the assumption that gain is the same for each channel, we have this:

RN Distribution

2.5x is the median value for the read noise distribution, meaning that half of the pixels have read noise less than 2.55e- RMS in that channel. Albeit a bit higher than scientific CMOS, which has median read noise of around 1e-, this is a lot better than CCDs.

When we save the read noise as a FITs image, more interesting results are revealed!

071_RN

Notice that the pixels having high read out noise always occur in vertical pairs, why? Well I guess the answer is due to the vertical 2 pixels read out sharing structure. Namely, 2.5T pixel. It’s possible the elevated noise in the common floating diffusion or the transistors cause elevated read noise appear in both photodiode.

Dark Current

To measure the dark current, I first checked the linearity of the dark count with exposure time. A bracketing set of exposures was taken after 40 minutes of thermo stabilization. And the average count in optical black and white point in effective pixels is checked. The test was done before the hack was available, but from the subtracted black level the linearity is nicely followed.

Dark_linearity

Dark_linearity_OB 

Now the actual dark current can be computed. A series of 5 minutes exposures were taken continuously. And the dark count can be illustrated using the following diagram. The dark current gradually increase from 0.13eps to 0.34eps at the end. It never reaches equilibrium even after 100 minutes as the battery continues to heat up.

Dark_current

As dark current accumulates with increased temperature, the distribution shifts right and becomes even dispersed due to dark current shot noise and hot pixels. dark_current

Recently, 2 NTC thermistors were discovered inside the camera, one of which resides on the sensor PCB. The good news is, there’s a PTP command to read the resistance value although it’s not reported in EXIF. The thermistor is not in direct contact with the sensor heat sink nor the metal mounting frame, but none the less it’s the best representation of sensor temperature so far.

Dark-Temp

The above dark current – temp diagram was constructed using 146 30sec dark frames and immediate NTC thermistor read out. 5% of extreme pixels on both end were discarded. 0.14eps at 25°C.

Regression

With linear regression, I could better tell the doubling temperature. A 4.8°C doubling temp was recorded around RT. Below 10°C, cooling the sensor give dimishing return as doubling temp goes to 6.8°C. But none the less, only 0.005eps of dark current is accumulating at freezing. That’s only 3 electrons for 10 minutes exposure!

For more sensor related information, view this post.

Updated 2015/2/27

Nikon D7000 H-Alpha Conversion

It has long been recognized as Nikon DSLRs are boosted by Sony sensors since D100. Now in the 3rd generation cameras, Nikon switch to Sony Exmor CMOS sensor from HAD CCDs. These CMOS sensor utilized on-chip column parallel Analog-to-Digital Converters (ADC) running at very low clock rate around 20kHz compared to serial external ADC that runs at around 10MHz (Such as D3/D700/D3s and Canon DSLRs. Calculation as follows: 12.2MP x 9FPS / 12 Channel = 9.2MP/ (Second x Channel) ). The slower clock rate and integration of ADC on chip significantly reduces read noise, as it would be beneficial for dynamic range.

The latest of all, D7000, has been analyzed by Chipworks and they had found a Sony IMX071 Exmor sensor within. Test done by Dxomark indicated increased sensitivity compared to previous CMOS sensor (D90 and D300s). Interestingly, either Nikon nor Sony advertise their gapless microlens structure as Canon always did, but it has been clearly revealed that IMX071 microlens array does not have gaps in between. (Fig 1)

IMX071 5D vs 5Dii

Figure 1. Chipworks teardown shown pixel vertical structure. Above: IMX071 gapless microlens. Below: Canon 5D and Canon 5D Mark II

Combination of significantly improved Quantum Efficiency (QE), lowered read noise and dark current at room temperature against CCDs, these DSLRs should be highly competent in astrophotography. However, one more obstacle remains: DSLR are not sensitive to hydrogen alpha line (656nm) from most of the emission nebulas simply because camera manufacture add on a color correction filter to mimic the response of human eye. This color correction filter absorb a large proportion of red  and almost all infrared photons while leaving green and blue channel untouched. The silicon based sensor itself are highly sensitive in the entire visible spectrum ranging from 400 to 700nm, and extending towards near infrared of 1100nm with much lower response. So the simple answer to this is remove it!

 

Warning!

Please use this instruction at your own risk! I will not be responsible if you accidentally break your camera in the process! If you have shaky hands and are not confident with doing this yourself, send it to a qualified company for conversion or don’t do it!

 

Filter Structure

But removing it cause another problem when large amount of infrared rushes towards the sensor, then how do we solve it? So let’s take a look the filter in detail.

Actually the filter is more complicated, it consists of 2 parts: a dust reduction filter, and a sandwich of 3 layers of glass stitched together. The later is usually called ICF (infrared cut filter), or sometimes by its other property – Anti-aliasing filter, or optical low pass filter (OLPF). Each layer has its own function. This filter stack not only serve to suppress infrared leakage and correction of color in red channel, but blurs the image on pixel level to reduce the color moiré inherited in Bayer sensor. The dust reduction filter and the last layer of ICF are both similar in thickness and are made of birefringent material. And the first layer of ICF is a wave plate similar to the one in your circular polarizing filter. When oriented 90° to each other in conjunction with the wave plate, they separated the light in horizontal and vertical direction respectively, translating one dot into 4 and thus blur the image. The thickness of both are tuned according to the pixel pitch. As a general rule, the bigger the pixel, more blur you need and thicker the birefringent layers.

D7000 sensor module showing inner filter stack on top and a dust reduction filter disassembled on right.

The middle layer in the ICF is the color correction filter that absorb deep red photons and infrared. Another thing to notice is the dust reduction glass is coated with an interference filter that blocks UV and IR. The sharp cutoff allows greater than 95% of visible spectrum between 430 to 680nm to pass through. So in this modification, we will only remove the 3 layers ICF stack while preserving the dust reduction filter that blocks UV/IR as well as keeping dust away. Removing this filter also change the infinity focus distance and you may not be able to achieve focus at infinity for some lenses. So I ordered a clear piece of optical glass with 1mm thick just in case.

 

Modification

The detailed disassembly step can be found at Lifepixel website: http://www.lifepixel.com/tutorials/infrared-diy-tutorials/nikon-d7000-ir

Before tearing down your camera, prepare the small boxes for preserving the screws. I used the petri dish to help me memorize the same batch of screws from the same panel. Duct tape can also help you organize the screws. Also be sure to ground yourself and not to do it during cold and dry winter to prevent static charge from damaging the delicate electronics inside. The screwdriver you need is #000 or 5/64″ Phillips type. Do not use flash before conversion nor open the flash. This will charge the capacitor and may give you an electrical shock once you touch it, or destroy the circuit when you accidentally short circuit inside.

The disassembly step are as follows:

1. Remove battery, eyepiece rubber cap and SD cards. Remove the lens and cap the body.

2. Unscrew and remove the bottom panel

Bottom Removed Bottom Panel

Bottom panel removed and it is made of plastic

3. Unscrew the ones on SD slot compartment, viewfinder, one on the left and 3 silver ones in the bottom. Gently lift LCD panel unit.

Back Panel

The back panel is made of magnesium alloy.

 Main PCB

4. Carefully flip the hinge connector using your finger nail or a forceps and gently release the ribbon cable from the slot. Be sure to identify which part is the rotating bar and which fixed jack. This is the most crucial and tricky step and you need to be really careful when dealing with these flat cables. Make sure all the cable are properly released before the next step.

Toshiba CPU Ribbon Cable Disconnect

The main PCB with Toshiba microcontroller chip. Ribbon cable are disconnected.

5. Unscrew the 6 silver screws on the PCB. Lift the PCB from right side and slowly pull the PCB to the right since the USB/HDMI jack is inserted into the plastic panel on the left of the camera.

Main PCB Backside CMOS PCB

The back side of PCB, where the virtual horizon sensor is in the bottom right corner. Removing the PCB exposes the sensor frame. The sensor power supply cable is L shape and the sensor output in 8 LVDS channels (+1 for Clock) to the main PCB.

6. Now it’s time to access the sensor. From this step on, you should consider dust and your dirty hands very seriously. I’m converting in a laboratory fume hood and wear latex gloves from this step onwards. The 3 big silver screw in the above image fasten the sensor module to the fore body of the camera. Once you tweak it, the focus calibration is no longer valid. To proceed, release the last ribbon cable and unscrew the sensor board. I suggest you mark the screws with color marker pen to distinguish the screw with its mounting hole, as well as its preset rotation position.

 

Marking

Mark the screw before proceed. The CMOS sensor is driven by a 54MHz crystal oscillator.

Working in hood

Now move to the hood

Sensor before Shutter

The sensor module and the shutter blades

7. The piezoelectric elements attached to the dust filter is connected via ribbon cable as well. But we do not need to desolder it. Unscrew the 4 holding the dust filter to the sensor unit and gently lift the dust filter frame (2 more on the right side in hidden below the aluminum foil). Once the screws come loose, gently lift the dust filter. Use the forceps to lift one corner of ICF and take it out. Reverse the steps and assemble your camera.

Sensor after conversion

After removal, sensor became much more transparent

 

ICF Structure

ICF/OLPF Diamension

The dimension of stack is 29.50mm x 25.30mm measured with a vernier scale. The wave plate and color correction filter is a little bit smaller, giving a 21.50mm in height. This dimension has been standard for Nikon since D70. The thickness reading from a micrometer yields a 1.182±0.002mm for the entire stack and 0.538±0.003mm for the transparent anti-aliasing glass. This means the color correction filter and wave plate is 0.64mm thick, which is identical to that in D90.

ICF

The cross section of ICF stack under microscope, showing 3 layers of wave plate, color correction layer and birefringent glass from bottom to top. The top is facing the CMOS sensor.

 

Focus Shift

Since we did not replace the ICF stack with a clear sheet of glass of equivalent optical depth, the camera now will become significantly nearsighted, and the phase detection focus will be useless. In my test, I set both lens and default focus fine tune to +20. The result is still slightly blurred. And for lenses with hard infinity focus stop, it will become impossible to achieve sharp focus at distance. Right now the only lens I have that can obtain focus at infinity is AF 180 2.8D, for this lens has to have a large tolerance of infinity for its focus shift of ED elements dependent on temperature variation.

Infinity after conversion

The Liveview infinity manual focus position largely deviates from original infinity focus, where bar should point right in the middle of the “\infty

My 18-105 DX seems to achieve infinity focus at zoom range greater than 30mm but not the wide angle end.

 

Sharpness Test

The removal of of ICF along with its anti-aliasing filter should increase the resolution on the pixel scale. This is in principle similar to recently announced D800E. However, as we had preserved the first AA layer for its IR rejection coating and dust reduction, this camera will have astigmatic vision. The images below are shot at ISO12233 chart at 70mm and fixed distance using liveview focus. NEF raw is taken and demosaic using MaxIM DL. These section are cropped at 200% from the same image.

After V

After H

After conversion, the vertical resolution is increased compared to horizontal. And the horizontal resolution remained the same (See below)

 

Before V

Before H

Before conversion, resolution is the same on 2 directions.

This test suggests that the dust filter separates the image on horizontal direction and the last layer of ICF blurs the vertical one.

 

OLPF under microscope

To investigate under a microscope, the last transparent layer of ICF stack is place between a stage micrometer and a 40x objective. The images below clearly illustrate the effect of the OLPF layer with a directional blurring of marking lines. When the ICF stack is placed with long edge parallel to the division lines (2nd image), it proves that the OLPF layer blurs the vertical direction. The displacement is roughly 3~4um, resembling the pixel pitch of IMX071.

Ruler

The stage micrometer with each division 10um apart

ICF Last Layer-Horizontal

Placing the transparent last layer on the micro-ruler, showing the displacement

ICF Last Layer-Vertical

Rotate 90° and the blurring direction changes accordingly. The green tint is from the color correction layer.

 

Clear glass replacement

Now in order to achieve infinity focus for my 18-105 lens, I’m going to replace the ICF with a clear optical glass. One way to test if the optical depth differences is simply to use a microscope. Place a sheet of paper underneath the filter and focus the microscope at 200x on the thin fiber on the paper. Then gentle replace it with the new optical glass. If the focus is sharp, then at least this means the focus remained the similar. The rest of the error will be within the range of D7000’s focus fine tune system.

The replacement HK-9 glass with a APS-C sensor as size comparison

Bonding Wire

Notice the bonding wire is sufficiently different from IMX038, where a lot of camera website used the wrong photo for this sensor. (Click for large image)

The procedure is the same, just place the glass in the same rubber gasket frame using forceps.

Clear glass on sensor

The rubber gasket sits on the IMX071 Sony CMOS sensor

 

This replacement glass lacks anti-reflection coating. The thickness is 40.3 Mil or 1.023mm. HK-9 glass is equivalent to BK-7 borosilicate glass with a refractive index of 1.5. After replacement, The focus almost comes back to the original factory setting.

 

Transmission Analysis

To roughly assess the transmission, I used the same lens setting to infinity focus and take a RAW image of 1/5s exposure at the LCD screen with the same aperture, ISO and the maximum brightness setting of LCD panel. The table below shows the raw average ADU count in the center uniformed area of image, and the ratio is normalized to ICF removal one.

RAW ADU

Ratio

R

G

B

R

G

B

Before

5738

11257

7947

0.51

0.86

0.92

ICF Remove

11308

13114

8643

1.00

1.00

1.00

HK-9

10651

12312

7966

0.94

0.94

0.92

It is astonishing that we have almost 1 fold gain in the red channel. The green channel is also improved a little. Note that HK-9 reflect and absorb 6-8% light in all channel.

 

Color Correction Filter Spectrum Property

Since gaining 1 fold more red light in a channel doesn’t mean the distribution of that gain is equal at different wavelength within. Here we use a UV-VIS spectrophotometer to measure the transmission profile of the infrared absorbing glass.

Transmission Spectrum

Transmission property of ICF, replacement glass and a quartz glass window (RCP) from 200 to 900nm. Actually I doubt the replacement glass as HK-9 will strongly absorb at 300nm, and the transmission curve closely resembles N-BK7 glass. Also notice that an uncoated glass window will reflect 8% of light in total on 2 interfaces. The quartz filter is broadband coated, which bring the transmittance up to >96%. The quartz is transparent down to 160~180nm in UV below the detection range of this spectrophotometer.

After all, this means we had a 4 fold gain at 656nm Ha emission line plus an increased QE of new generation sensor, personally I’m well satisfied with this result.

 

Updated 6/7/2013