How to adjust measured values depending on control values? I have taken 20 photographs. Each photograph contained a museum specimen of a bird and a colour chart. In each photograph, I measured the brightness of a specific part of the bird's plumage and the brightness of a specific part of the colour chart. In each photograph, the value of the colour chart should be 50. However, due to light conditions varying from photograph to photograph, the brightness values of the colour chart are sometimes below 50 and sometimes above 50. Therefore, the brightness of the bird's plumage should be adjusted accordingly. The dataframe is a representation of the brightness values obtained for the colour chart and the brightness values obtained for the bird plumage:
set.seed(50)
data.frame(brightness.colour.chart = c(sample(40:55, 20, replace=T)),
           brightness.bird.plumage = sample(seq(1, 10, 0.1), 20))

   brightness.colour.chart brightness.bird.plumage
1                       51                     6.6
2                       47                     2.7
3                       43                     7.3
4                       52                     8.4
5                       48                     3.6
6                       40                     6.5
7                       51                     5.9
8                       50                     3.1
9                       40                     9.6
10                      41                     4.0
11                      46                     3.9
12                      44                     4.2
13                      50                     4.4
14                      41                     5.8
15                      44                     9.9
16                      50                     5.7
17                      53                     1.9
18                      45                     6.1
19                      41                     3.7
20                      42                     4.3

What is the best way to adjust the brightness values for the bird plumage so they are constant across each photograph?
 A: Best way would be to take photos of a few birds (together with the colour card) several times under each of a few different lighting conditions. Then model the measured brightness.bird.plumage with brightness.colour.chart as a continuous fixed effect, possibly non-linear, & individual.bird as a random effect. Significant interaction or heteroskedasticity that you couldn't transform away would warn you of problems with the approach, & you could compare the magnitude of differences between birds to that of error in the measurement process.
If you don't want any extra (physical) work, then the second-best is to use the data you already have to model brightness.bird.plumage on brightness.colour.chart & to take, by assumption, the residuals as informative about the differences between individual birds. (You can add each to the fitted value of brightness.bird.plumage for a brightness.colour.chart of 50.) It might be worth listing some of those assumptions:


*

*Lighting conditions aren't too badly confounded with plumage brightness. If the more spectacular birds are displayed in well-lit corridors & the drab ones relegated to dim corners you could easily over-estimate the slope of brightness.colour.chart.

*Measurement of brightness is precise; i.e. if you were to measure the brightness of the same bird's plumage several times under the same lighting conditions you'd get the same answer, or at least the variability would be tiny compared to the variability between different birds. In the worst case the residuals could be telling you next to nothing about real differences between birds. Precision could vary from bird to bird—say if the measured brightness of iridescent plumage such as that of kingfishers or hummingbirds is sensitive to the angle of the shot.

*Lighting conditions have a consistent effect on measured plumage brightness. Does the brightness of older specimens improve more slowly with better light than that of recent specimens, owing to the gradual breakdown of the oily coating's affecting reflectivity? (I've no idea, but I'd believe it if you told me it was so.)
You can see that some knowledge of photography, taxidermy, curation, & ornithology is needed to be able to make them confidently.
