Coverage for colour/characterisation/datasets/cameras/dslr/sensitivities.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-15 19:01 +1300

1""" 

2Sensitivities of *DSLR* Cameras 

3=============================== 

4 

5Define the sensitivities of *DSLR* cameras. 

6 

7Each *DSLR* camera data is in the form of a *dict* of 

8:class:`colour.characterisation.RGB_CameraSensitivities` classes as follows:: 

9 

10 { 

11 'name': RGB_CameraSensitivities, 

12 ..., 

13 'name': RGB_CameraSensitivities 

14 } 

15 

16The following *DSLR* cameras are available: 

17 

18- Nikon 5100 (NPL) 

19- Sigma SDMerill (NPL) 

20 

21References 

22---------- 

23- :cite:`Darrodi2015a` : Darrodi, M. M., Finlayson, G., Goodman, T., & 

24 Mackiewicz, M. (2015). Reference data set for camera spectral sensitivity 

25 estimation. Journal of the Optical Society of America A, 32(3), 381. 

26 doi:10.1364/JOSAA.32.000381 

27""" 

28 

29from __future__ import annotations 

30 

31from functools import partial 

32 

33from colour.characterisation import RGB_CameraSensitivities 

34from colour.utilities import LazyCanonicalMapping 

35 

36__author__ = "Colour Developers" 

37__copyright__ = "Copyright 2013 Colour Developers" 

38__license__ = "BSD-3-Clause - https://opensource.org/licenses/BSD-3-Clause" 

39__maintainer__ = "Colour Developers" 

40__email__ = "colour-developers@colour-science.org" 

41__status__ = "Production" 

42 

43__all__ = [ 

44 "DATA_CAMERA_SENSITIVITIES_DSLR", 

45 "MSDS_CAMERA_SENSITIVITIES_DSLR", 

46] 

47 

48DATA_CAMERA_SENSITIVITIES_DSLR: dict = { 

49 "Nikon 5100 (NPL)": { 

50 380.0: ( 

51 0.00156384299336578000, 

52 0.00011500000000000000, 

53 0.00180956039402335990, 

54 ), 

55 385.0: ( 

56 0.00189691771384825000, 

57 0.00152114360178015000, 

58 0.00048982814544150399, 

59 ), 

60 390.0: ( 

61 0.00000000000000000000, 

62 0.00057430499183558695, 

63 0.00087943069176996504, 

64 ), 

65 395.0: ( 

66 0.00000000000000000000, 

67 0.00000000000000000000, 

68 0.00000000000000000000, 

69 ), 

70 400.0: ( 

71 0.00000000000000000000, 

72 0.00000000000000000000, 

73 0.00153246068848051000, 

74 ), 

75 405.0: ( 

76 0.00071776703300973298, 

77 0.00119722386224553000, 

78 0.00569805602282062030, 

79 ), 

80 410.0: ( 

81 0.00292397466563330000, 

82 0.00133571498448177000, 

83 0.01660828769874150200, 

84 ), 

85 415.0: ( 

86 0.01293626801713740000, 

87 0.01319431696052810100, 

88 0.07879120559214590500, 

89 ), 

90 420.0: ( 

91 0.04959786481566520000, 

92 0.06497102451249539600, 

93 0.36171350364994898000, 

94 ), 

95 425.0: ( 

96 0.07607250435970400200, 

97 0.11510308718828900000, 

98 0.65970462106512295000, 

99 ), 

100 430.0: ( 

101 0.07658892708274399300, 

102 0.13706582547087201000, 

103 0.75534360010359503000, 

104 ), 

105 435.0: ( 

106 0.06833381956036009600, 

107 0.15242852584030600000, 

108 0.81045312707380701000, 

109 ), 

110 440.0: ( 

111 0.06131816189646559900, 

112 0.16864005450745301000, 

113 0.87494523362472998000, 

114 ), 

115 445.0: ( 

116 0.05473314457789760200, 

117 0.18329934605049600000, 

118 0.92671273991178704000, 

119 ), 

120 450.0: ( 

121 0.04886204743702320100, 

122 0.19603263456229600000, 

123 0.96314088025989897000, 

124 ), 

125 455.0: ( 

126 0.04284591974257399800, 

127 0.21733653278361301000, 

128 0.98065048133510302000, 

129 ), 

130 460.0: ( 

131 0.04022845332691499900, 

132 0.25424357380995000000, 

133 1.00000000000000000000, 

134 ), 

135 465.0: ( 

136 0.04340795992263239700, 

137 0.30864811930649899000, 

138 0.99640467488711104000, 

139 ), 

140 470.0: ( 

141 0.04762021431177430200, 

142 0.37346871184252001000, 

143 0.98896988650084305000, 

144 ), 

145 475.0: ( 

146 0.05077188480559390000, 

147 0.42915806139893697000, 

148 0.95660139953157997000, 

149 ), 

150 480.0: ( 

151 0.05280329597225499900, 

152 0.45965432432137399000, 

153 0.90495886986980800000, 

154 ), 

155 485.0: ( 

156 0.05257122025495090300, 

157 0.47106435446394301000, 

158 0.83940927710351598000, 

159 ), 

160 490.0: ( 

161 0.04789463902845950100, 

162 0.48885616444524799000, 

163 0.75146259578963404000, 

164 ), 

165 495.0: ( 

166 0.04823994170483859900, 

167 0.53715178104087602000, 

168 0.66010202032260801000, 

169 ), 

170 500.0: ( 

171 0.05022924089718029700, 

172 0.61649118695883898000, 

173 0.56706879193613802000, 

174 ), 

175 505.0: ( 

176 0.05507649735001429700, 

177 0.70700638759968903000, 

178 0.47935094782603899000, 

179 ), 

180 510.0: ( 

181 0.06370211901178619900, 

182 0.80096424601366301000, 

183 0.39406273870351299000, 

184 ), 

185 515.0: ( 

186 0.08038951305895999900, 

187 0.88137256686267296000, 

188 0.31427061879449603000, 

189 ), 

190 520.0: ( 

191 0.10038750399831201000, 

192 0.93887792119838498000, 

193 0.24981663439426000000, 

194 ), 

195 525.0: ( 

196 0.11861314902313400000, 

197 0.98446559576523596000, 

198 0.20182351924718100000, 

199 ), 

200 530.0: ( 

201 0.12360875120338000000, 

202 1.00000000000000000000, 

203 0.16163395085177601000, 

204 ), 

205 535.0: ( 

206 0.10306249932787701000, 

207 0.99084026557129701000, 

208 0.13516143147333401000, 

209 ), 

210 540.0: ( 

211 0.07634108360672720000, 

212 0.96154626462922099000, 

213 0.10998875716043301000, 

214 ), 

215 545.0: ( 

216 0.05278086364640900000, 

217 0.92814388346877297000, 

218 0.08639435407789379500, 

219 ), 

220 550.0: ( 

221 0.04118873831058649700, 

222 0.88910231592076505000, 

223 0.06525313059219839400, 

224 ), 

225 555.0: ( 

226 0.03904385351931050100, 

227 0.83494222924161199000, 

228 0.04785595345227559900, 

229 ), 

230 560.0: ( 

231 0.04254429440089119900, 

232 0.77631807500187500000, 

233 0.03413932303860940000, 

234 ), 

235 565.0: ( 

236 0.06021313241068020100, 

237 0.70731424532056497000, 

238 0.02401990976851929900, 

239 ), 

240 570.0: ( 

241 0.11179621705066800000, 

242 0.63579620249170998000, 

243 0.01976793598476750100, 

244 ), 

245 575.0: ( 

246 0.26967059703276203000, 

247 0.56551528450380395000, 

248 0.01634844781073010000, 

249 ), 

250 580.0: ( 

251 0.56450337990639099000, 

252 0.49275517253522499000, 

253 0.01381733937020259900, 

254 ), 

255 585.0: ( 

256 0.85360126947261405000, 

257 0.42475654159075799000, 

258 0.01195294647966710000, 

259 ), 

260 590.0: ( 

261 0.98103242181506201000, 

262 0.35178931226078303000, 

263 0.01000909395820090100, 

264 ), 

265 595.0: ( 

266 1.00000000000000000000, 

267 0.27817849879541801000, 

268 0.00758776308929657970, 

269 ), 

270 600.0: ( 

271 0.96307105371259005000, 

272 0.21167353249961901000, 

273 0.00645584463521649970, 

274 ), 

275 605.0: ( 

276 0.90552061898043101000, 

277 0.15671644549433000000, 

278 0.00522978285684488030, 

279 ), 

280 610.0: ( 

281 0.83427841652645296000, 

282 0.11803962073050200000, 

283 0.00365998459503786990, 

284 ), 

285 615.0: ( 

286 0.76798733762510296000, 

287 0.08885249534231440300, 

288 0.00395538505488667040, 

289 ), 

290 620.0: ( 

291 0.70366798041157996000, 

292 0.07010184404853669900, 

293 0.00396835221654468030, 

294 ), 

295 625.0: ( 

296 0.63916484476123703000, 

297 0.05690899470893220200, 

298 0.00349138004486036990, 

299 ), 

300 630.0: ( 

301 0.57081292173776299000, 

302 0.04729879101895839700, 

303 0.00404302103181797010, 

304 ), 

305 635.0: ( 

306 0.49581796193158800000, 

307 0.04119589002556579800, 

308 0.00418929985295813000, 

309 ), 

310 640.0: ( 

311 0.43833913452368101000, 

312 0.03525207084991220000, 

313 0.00554676856500057980, 

314 ), 

315 645.0: ( 

316 0.38896992260406899000, 

317 0.03069313144532450100, 

318 0.00546423323547744030, 

319 ), 

320 650.0: ( 

321 0.34295621205484700000, 

322 0.02680396295683950100, 

323 0.00597382847392098970, 

324 ), 

325 655.0: ( 

326 0.29278541836293998000, 

327 0.02352430119871520100, 

328 0.00630906774763779000, 

329 ), 

330 660.0: ( 

331 0.23770718073119301000, 

332 0.02034633252474659900, 

333 0.00610412697742267980, 

334 ), 

335 665.0: ( 

336 0.16491386803178501000, 

337 0.01545848325340879900, 

338 0.00483655792375416000, 

339 ), 

340 670.0: ( 

341 0.09128771706377150600, 

342 0.00944075104617158980, 

343 0.00302664794586984980, 

344 ), 

345 675.0: ( 

346 0.04205615047283590300, 

347 0.00508102204063505970, 

348 0.00172169700987674990, 

349 ), 

350 680.0: ( 

351 0.02058267877678380100, 

352 0.00291019166901752010, 

353 0.00078065128657817595, 

354 ), 

355 685.0: ( 

356 0.01028680596369610000, 

357 0.00162657557793382010, 

358 0.00056963070848184102, 

359 ), 

360 690.0: ( 

361 0.00540759846247261970, 

362 0.00092251569139627796, 

363 0.00027523296133938200, 

364 ), 

365 695.0: ( 

366 0.00272409261591003000, 

367 0.00049743349969026901, 

368 0.00029672137857068598, 

369 ), 

370 700.0: ( 

371 0.00127834798711079000, 

372 0.00041215940263165701, 

373 0.00024951192304202899, 

374 ), 

375 705.0: ( 

376 0.00078123118374132301, 

377 0.00031692634104666300, 

378 8.5000000000000006e-05, 

379 ), 

380 710.0: ( 

381 0.00047981421940270001, 

382 0.00025621496960251102, 

383 0.00041916895092770603, 

384 ), 

385 715.0: ( 

386 0.00049133356428571098, 

387 0.00000000000000000000, 

388 0.00015331743444139899, 

389 ), 

390 720.0: ( 

391 0.00017414897796340199, 

392 0.00024353518865341200, 

393 1.8300000000000001e-05, 

394 ), 

395 725.0: ( 

396 0.00012017462571764001, 

397 6.0200000000000000e-05, 

398 0.00000000000000000000, 

399 ), 

400 730.0: ( 

401 0.00000000000000000000, 

402 0.00000000000000000000, 

403 0.00033869381945204901, 

404 ), 

405 735.0: ( 

406 6.1199999999999997e-05, 

407 0.00000000000000000000, 

408 0.00000000000000000000, 

409 ), 

410 740.0: ( 

411 0.00000000000000000000, 

412 0.00000000000000000000, 

413 0.00000000000000000000, 

414 ), 

415 745.0: ( 

416 0.00000000000000000000, 

417 1.7099999999999999e-05, 

418 0.00016527828734010200, 

419 ), 

420 750.0: ( 

421 0.00031099754946016501, 

422 5.2099999999999999e-05, 

423 0.00017755262214537101, 

424 ), 

425 755.0: ( 

426 0.00000000000000000000, 

427 8.8499999999999996e-05, 

428 0.00000000000000000000, 

429 ), 

430 760.0: ( 

431 0.00000000000000000000, 

432 0.00000000000000000000, 

433 2.4300000000000001e-05, 

434 ), 

435 765.0: ( 

436 0.00000000000000000000, 

437 0.00000000000000000000, 

438 6.1799999999999998e-05, 

439 ), 

440 770.0: ( 

441 8.5599999999999994e-05, 

442 0.00013799999999999999, 

443 0.00026260703183506501, 

444 ), 

445 775.0: ( 

446 0.00013831372865247499, 

447 0.0001786501727059410, 

448 0.00028050537004191899, 

449 ), 

450 780.0: ( 

451 3.6199999999999999e-05, 

452 4.2500000000000003e-05, 

453 0.00000000000000000000, 

454 ), 

455 }, 

456 "Sigma SDMerill (NPL)": { 

457 400.0: ( 

458 0.00562107440608700020, 

459 0.00632809751263116970, 

460 0.16215942413307899000, 

461 ), 

462 410.0: ( 

463 0.00650335624511722000, 

464 0.00976180459591275040, 

465 0.28549837804628603000, 

466 ), 

467 420.0: ( 

468 0.07407911289140040000, 

469 0.02527177008261050100, 

470 0.39690431060902098000, 

471 ), 

472 430.0: ( 

473 0.04302295946292879900, 

474 0.08375118585311219800, 

475 0.50831024317175599000, 

476 ), 

477 440.0: ( 

478 0.03450952562247010200, 

479 0.14370381974360999000, 

480 0.62211847246948804000, 

481 ), 

482 450.0: ( 

483 0.01889156723434350100, 

484 0.18361168930882199000, 

485 0.73742136245769496000, 

486 ), 

487 460.0: ( 

488 0.00731107699680200000, 

489 0.40909478009952999000, 

490 0.94538036670138004000, 

491 ), 

492 470.0: ( 

493 0.04549915123096019700, 

494 0.51595564086176404000, 

495 0.96441494770280400000, 

496 ), 

497 480.0: ( 

498 0.05676752921111680200, 

499 0.60120664662705503000, 

500 1.00000000000000000000, 

501 ), 

502 490.0: ( 

503 0.13419592065917799000, 

504 0.67031679980136305000, 

505 0.98598021188452500000, 

506 ), 

507 500.0: ( 

508 0.16475268997837600000, 

509 0.75258747153475802000, 

510 0.98340266357529005000, 

511 ), 

512 510.0: ( 

513 0.21712641978639199000, 

514 0.84381384368944201000, 

515 0.96969219567072595000, 

516 ), 

517 520.0: ( 

518 0.30648343835824399000, 

519 0.90151724558812696000, 

520 0.94280817402079797000, 

521 ), 

522 530.0: ( 

523 0.34984579614888500000, 

524 0.91975030668767699000, 

525 0.89664279918070899000, 

526 ), 

527 540.0: ( 

528 0.44374258133259298000, 

529 0.96799429052157804000, 

530 0.88444590220041897000, 

531 ), 

532 550.0: ( 

533 0.44488860528126301000, 

534 0.95725231064041105000, 

535 0.86791899071597101000, 

536 ), 

537 560.0: ( 

538 0.47897575674702603000, 

539 0.95204791860047400000, 

540 0.83375679584908402000, 

541 ), 

542 570.0: ( 

543 0.50950291481073895000, 

544 0.97628014458399803000, 

545 0.83204140240572999000, 

546 ), 

547 580.0: ( 

548 0.59262909378530504000, 

549 0.97258624388955806000, 

550 0.80054956384778198000, 

551 ), 

552 590.0: ( 

553 0.67383327560697603000, 

554 1.00000000000000000000, 

555 0.78289512474646505000, 

556 ), 

557 600.0: ( 

558 0.71403771488106504000, 

559 0.96948452757777404000, 

560 0.73946953007191796000, 

561 ), 

562 610.0: ( 

563 0.86000761311495100000, 

564 0.95441319124850699000, 

565 0.66718640174985699000, 

566 ), 

567 620.0: ( 

568 0.89810302849565204000, 

569 0.93335435890921303000, 

570 0.62043627806816704000, 

571 ), 

572 630.0: ( 

573 1.00000000000000000000, 

574 0.92571406833636205000, 

575 0.61116087876956704000, 

576 ), 

577 640.0: ( 

578 0.99494213311245205000, 

579 0.88486439541503403000, 

580 0.55173556195710605000, 

581 ), 

582 650.0: ( 

583 0.92085127736137995000, 

584 0.76165184741615699000, 

585 0.46538831744516401000, 

586 ), 

587 660.0: ( 

588 0.18143311631425299000, 

589 0.14052437057150499000, 

590 0.07961907836720690000, 

591 ), 

592 670.0: ( 

593 0.00630978795372749960, 

594 0.00414367215817645990, 

595 0.00059244446107236802, 

596 ), 

597 680.0: ( 

598 0.00528874383171553000, 

599 0.00183198958165669010, 

600 0.00468563680483140980, 

601 ), 

602 }, 

603} 

604 

605MSDS_CAMERA_SENSITIVITIES_DSLR = LazyCanonicalMapping( 

606 { 

607 "Nikon 5100 (NPL)": partial( 

608 RGB_CameraSensitivities, 

609 DATA_CAMERA_SENSITIVITIES_DSLR["Nikon 5100 (NPL)"], 

610 name="Nikon 5100 (NPL)", 

611 ), 

612 "Sigma SDMerill (NPL)": partial( 

613 RGB_CameraSensitivities, 

614 DATA_CAMERA_SENSITIVITIES_DSLR["Sigma SDMerill (NPL)"], 

615 name="Sigma SDMerill (NPL)", 

616 ), 

617 } 

618) 

619""" 

620Multi-spectral distributions of *DSLR* camera sensitivities. 

621 

622References 

623---------- 

624:cite:`Darrodi2015a` 

625"""