Step by step instruction for lens database update for newbie

Hi All,
is there anyone who can explain how to perform the update of lens database in Darktable?
I use a Nikon D850 with Sigma SIGMA Art 14-24mm F2.8 DG HSM and unfortunately this lens is missing on my Darktable 4.4.2 lens correction list.
The problem is that I’m not advanced in computers - for me “lensfun-update-data” command as recommended on official Darktable Help site is something that is totally beyond me.
I have read that I have to instal first ubuntu to do anything with that. I use Windows 11 OS and changing to a different system would be a pain for me.
So to make a long story short - is there anyone to explain to newbie like me what to do step by step to have my Sigma 14-24 on the list?
Many thanks in advance!

Welcome.

Your first step should be to go to www.darktable.org.m and download 4.6.1. it might have that lens in the database.

If your lens is indeed the Sigma 12-24mm F4 DG HSM Art (and not 14-24mm as you wrote) then it is indeed in the lensfun version 1 database used by darktable. There is no simple way to update the database in Windows that I am aware of. But you definitively don’t want to change your operating system just for that! :scream:

If you feel like compiling a program in Windows, you could go there and try this (I did and it works just fine): GitHub - butcherg/lensfun_dbupdate: Cross-platform C++ program to update lensfun databases

But if you only need to update one lens, you can just edit the lensfun xml file and add your lens. In your particular case, you would need to update the slr-sigma.xml file located in your C:\Program Files\darktable\share\lensfun\version_1 folder.

Below is what I found for the Sigma 12-24mm lens in this file:

    <lens>
        <maker>Sigma</maker>
        <model>Sigma 12-24mm F4 DG HSM Art</model>
        <mount>Nikon F AF</mount>
        <cropfactor>1.0</cropfactor>
        <calibration>
            <distortion model="ptlens" focal="12.0" a="0.021" b="-0.083" c="0.094"/>
            <distortion model="ptlens" focal="14.0" a="0.005" b="-0.027" c="0.042"/>
            <distortion model="ptlens" focal="16.0" a="-0.015" b="0.045" c="-0.034"/>
            <distortion model="ptlens" focal="18.0" a="-0.014" b="0.054" c="-0.055"/>
            <distortion model="ptlens" focal="20.0" a="-0.012" b="0.046" c="-0.042"/>
            <distortion model="ptlens" focal="24.0" a="-0.007" b="0.037" c="-0.049"/>
            <tca model="poly3" focal="12.0" vr="1.0001190" vb="1.0000835"/>
            <tca model="poly3" focal="14.0" vr="1.0001161" vb="1.0000711"/>
            <tca model="poly3" focal="16.0" vr="1.0001140" vb="1.0000683"/>
            <tca model="poly3" focal="18.0" vr="1.0001028" vb="1.0000531"/>
            <tca model="poly3" focal="20.0" vr="1.0001201" vb="1.0000438"/>
            <tca model="poly3" focal="24.0" vr="1.0000905" vb="1.0000356"/>
            <vignetting model="pa" focal="12.0" aperture="4.0" distance="10" k1="-0.8390250" k2="0.1122887" k3="-0.0138650"/>
            <vignetting model="pa" focal="12.0" aperture="4.0" distance="1000" k1="-0.8390250" k2="0.1122887" k3="-0.0138650"/>
            <vignetting model="pa" focal="12.0" aperture="5.6" distance="10" k1="-0.8390812" k2="0.4628734" k3="-0.2295278"/>
            <vignetting model="pa" focal="12.0" aperture="5.6" distance="1000" k1="-0.8390812" k2="0.4628734" k3="-0.2295278"/>
            <vignetting model="pa" focal="12.0" aperture="8.0" distance="10" k1="-0.8362168" k2="0.4094857" k3="-0.0824125"/>
            <vignetting model="pa" focal="12.0" aperture="8.0" distance="1000" k1="-0.8362168" k2="0.4094857" k3="-0.0824125"/>
            <vignetting model="pa" focal="12.0" aperture="11.0" distance="10" k1="-0.8267311" k2="0.3523282" k3="-0.0235041"/>
            <vignetting model="pa" focal="12.0" aperture="11.0" distance="1000" k1="-0.8267311" k2="0.3523282" k3="-0.0235041"/>
            <vignetting model="pa" focal="12.0" aperture="16.0" distance="10" k1="-0.8330935" k2="0.3683259" k3="-0.0332956"/>
            <vignetting model="pa" focal="12.0" aperture="16.0" distance="1000" k1="-0.8330935" k2="0.3683259" k3="-0.0332956"/>
            <vignetting model="pa" focal="12.0" aperture="22.0" distance="10" k1="-0.8807027" k2="0.4687412" k3="-0.0994596"/>
            <vignetting model="pa" focal="12.0" aperture="22.0" distance="1000" k1="-0.8807027" k2="0.4687412" k3="-0.0994596"/>
            <vignetting model="pa" focal="14.0" aperture="4.0" distance="10" k1="-0.7888706" k2="-0.0742278" k3="0.2542661"/>
            <vignetting model="pa" focal="14.0" aperture="4.0" distance="1000" k1="-0.7888706" k2="-0.0742278" k3="0.2542661"/>
            <vignetting model="pa" focal="14.0" aperture="5.6" distance="10" k1="-0.7827561" k2="0.3128774" k3="-0.0946465"/>
            <vignetting model="pa" focal="14.0" aperture="5.6" distance="1000" k1="-0.7827561" k2="0.3128774" k3="-0.0946465"/>
            <vignetting model="pa" focal="14.0" aperture="8.0" distance="10" k1="-0.8231366" k2="0.4182086" k3="-0.0966435"/>
            <vignetting model="pa" focal="14.0" aperture="8.0" distance="1000" k1="-0.8231366" k2="0.4182086" k3="-0.0966435"/>
            <vignetting model="pa" focal="14.0" aperture="11.0" distance="10" k1="-0.7942607" k2="0.2946077" k3="0.0106987"/>
            <vignetting model="pa" focal="14.0" aperture="11.0" distance="1000" k1="-0.7942607" k2="0.2946077" k3="0.0106987"/>
            <vignetting model="pa" focal="14.0" aperture="16.0" distance="10" k1="-0.7662476" k2="0.2282539" k3="0.0476406"/>
            <vignetting model="pa" focal="14.0" aperture="16.0" distance="1000" k1="-0.7662476" k2="0.2282539" k3="0.0476406"/>
            <vignetting model="pa" focal="14.0" aperture="22.0" distance="10" k1="-0.7723964" k2="0.2342732" k3="0.0353598"/>
            <vignetting model="pa" focal="14.0" aperture="22.0" distance="1000" k1="-0.7723964" k2="0.2342732" k3="0.0353598"/>
            <vignetting model="pa" focal="16.0" aperture="4.0" distance="10" k1="-0.7490125" k2="-0.1318615" k3="0.2706794"/>
            <vignetting model="pa" focal="16.0" aperture="4.0" distance="1000" k1="-0.7490125" k2="-0.1318615" k3="0.2706794"/>
            <vignetting model="pa" focal="16.0" aperture="5.6" distance="10" k1="-0.6158432" k2="-0.0031965" k3="0.0610185"/>
            <vignetting model="pa" focal="16.0" aperture="5.6" distance="1000" k1="-0.6158432" k2="-0.0031965" k3="0.0610185"/>
            <vignetting model="pa" focal="16.0" aperture="8.0" distance="10" k1="-0.6847141" k2="0.1642851" k3="0.0279079"/>
            <vignetting model="pa" focal="16.0" aperture="8.0" distance="1000" k1="-0.6847141" k2="0.1642851" k3="0.0279079"/>
            <vignetting model="pa" focal="16.0" aperture="11.0" distance="10" k1="-0.6709024" k2="0.1413247" k3="0.0486237"/>
            <vignetting model="pa" focal="16.0" aperture="11.0" distance="1000" k1="-0.6709024" k2="0.1413247" k3="0.0486237"/>
            <vignetting model="pa" focal="16.0" aperture="16.0" distance="10" k1="-0.6638484" k2="0.0879962" k3="0.1010905"/>
            <vignetting model="pa" focal="16.0" aperture="16.0" distance="1000" k1="-0.6638484" k2="0.0879962" k3="0.1010905"/>
            <vignetting model="pa" focal="16.0" aperture="22.0" distance="10" k1="-0.6419510" k2="0.0944572" k3="0.0767228"/>
            <vignetting model="pa" focal="16.0" aperture="22.0" distance="1000" k1="-0.6419510" k2="0.0944572" k3="0.0767228"/>
            <vignetting model="pa" focal="18.0" aperture="4.0" distance="10" k1="-0.7025726" k2="-0.1382112" k3="0.2652945"/>
            <vignetting model="pa" focal="18.0" aperture="4.0" distance="1000" k1="-0.7025726" k2="-0.1382112" k3="0.2652945"/>
            <vignetting model="pa" focal="18.0" aperture="5.6" distance="10" k1="-0.5354175" k2="-0.0922871" k3="0.1071577"/>
            <vignetting model="pa" focal="18.0" aperture="5.6" distance="1000" k1="-0.5354175" k2="-0.0922871" k3="0.1071577"/>
            <vignetting model="pa" focal="18.0" aperture="8.0" distance="10" k1="-0.6221207" k2="0.1732931" k3="-0.0034410"/>
            <vignetting model="pa" focal="18.0" aperture="8.0" distance="1000" k1="-0.6221207" k2="0.1732931" k3="-0.0034410"/>
            <vignetting model="pa" focal="18.0" aperture="11.0" distance="10" k1="-0.6405182" k2="0.2239159" k3="-0.0428450"/>
            <vignetting model="pa" focal="18.0" aperture="11.0" distance="1000" k1="-0.6405182" k2="0.2239159" k3="-0.0428450"/>
            <vignetting model="pa" focal="18.0" aperture="16.0" distance="10" k1="-0.6414791" k2="0.1701879" k3="0.0236998"/>
            <vignetting model="pa" focal="18.0" aperture="16.0" distance="1000" k1="-0.6414791" k2="0.1701879" k3="0.0236998"/>
            <vignetting model="pa" focal="18.0" aperture="22.0" distance="10" k1="-0.6479049" k2="0.1761336" k3="0.0310765"/>
            <vignetting model="pa" focal="18.0" aperture="22.0" distance="1000" k1="-0.6479049" k2="0.1761336" k3="0.0310765"/>
            <vignetting model="pa" focal="20.0" aperture="4.0" distance="10" k1="-0.8575761" k2="0.2118072" k3="0.0688795"/>
            <vignetting model="pa" focal="20.0" aperture="4.0" distance="1000" k1="-0.8575761" k2="0.2118072" k3="0.0688795"/>
            <vignetting model="pa" focal="20.0" aperture="5.6" distance="10" k1="-0.4953496" k2="-0.1465221" k3="0.1454905"/>
            <vignetting model="pa" focal="20.0" aperture="5.6" distance="1000" k1="-0.4953496" k2="-0.1465221" k3="0.1454905"/>
            <vignetting model="pa" focal="20.0" aperture="8.0" distance="10" k1="-0.6463415" k2="0.3445459" k3="-0.1359145"/>
            <vignetting model="pa" focal="20.0" aperture="8.0" distance="1000" k1="-0.6463415" k2="0.3445459" k3="-0.1359145"/>
            <vignetting model="pa" focal="20.0" aperture="11.0" distance="10" k1="-0.6730594" k2="0.4125091" k3="-0.1570030"/>
            <vignetting model="pa" focal="20.0" aperture="11.0" distance="1000" k1="-0.6730594" k2="0.4125091" k3="-0.1570030"/>
            <vignetting model="pa" focal="20.0" aperture="16.0" distance="10" k1="-0.6620019" k2="0.4082285" k3="-0.1541806"/>
            <vignetting model="pa" focal="20.0" aperture="16.0" distance="1000" k1="-0.6620019" k2="0.4082285" k3="-0.1541806"/>
            <vignetting model="pa" focal="20.0" aperture="22.0" distance="10" k1="-0.5626504" k2="0.2357848" k3="-0.0675099"/>
            <vignetting model="pa" focal="20.0" aperture="22.0" distance="1000" k1="-0.5626504" k2="0.2357848" k3="-0.0675099"/>
            <vignetting model="pa" focal="24.0" aperture="4.0" distance="10" k1="-0.8492106" k2="0.4031604" k3="-0.0941551"/>
            <vignetting model="pa" focal="24.0" aperture="4.0" distance="1000" k1="-0.8492106" k2="0.4031604" k3="-0.0941551"/>
            <vignetting model="pa" focal="24.0" aperture="5.6" distance="10" k1="-0.1976915" k2="-0.5869146" k3="0.3476471"/>
            <vignetting model="pa" focal="24.0" aperture="5.6" distance="1000" k1="-0.1976915" k2="-0.5869146" k3="0.3476471"/>
            <vignetting model="pa" focal="24.0" aperture="8.0" distance="10" k1="-0.3072110" k2="-0.1200385" k3="0.0636262"/>
            <vignetting model="pa" focal="24.0" aperture="8.0" distance="1000" k1="-0.3072110" k2="-0.1200385" k3="0.0636262"/>
            <vignetting model="pa" focal="24.0" aperture="11.0" distance="10" k1="-0.2836420" k2="-0.1691360" k3="0.1253739"/>
            <vignetting model="pa" focal="24.0" aperture="11.0" distance="1000" k1="-0.2836420" k2="-0.1691360" k3="0.1253739"/>
            <vignetting model="pa" focal="24.0" aperture="16.0" distance="10" k1="-0.3225284" k2="-0.1196771" k3="0.1200428"/>
            <vignetting model="pa" focal="24.0" aperture="16.0" distance="1000" k1="-0.3225284" k2="-0.1196771" k3="0.1200428"/>
            <vignetting model="pa" focal="24.0" aperture="22.0" distance="10" k1="-0.3811472" k2="0.0610443" k3="0.0036752"/>
            <vignetting model="pa" focal="24.0" aperture="22.0" distance="1000" k1="-0.3811472" k2="0.0610443" k3="0.0036752"/>
        </calibration>
    </lens>

Hi g-man, hi dtrtuser,
my lens is sigma exactly 14-24mm F2.8 DG HSM.
I have made un update to 4.6.1 version as g-man suggested, and in fact some new lenses appeared, among them there is 12-24 Sigma lens. Unfortunately there is no 14-24 there :frowning:
Maybe there is a script for Sigma 14-24 for Nikon D850?

I guess the next best thing would be to create your own lens calibration by following these instructions: PIXLS.US - Create lens calibration data for lensfun. But I am not sure if this can be done in a Windows environment.

(If I can find some time, I might give it a try and will let you know)

If you shoot the calibration images, but can’t run the script, you can submit the images to the lensfun project and they’ll do the processing for you. They do generally have a back log tho.

Perhaps this is relevant to the issue;
I have a “Sigma 150-600mm f/5-6.3 DG OS HSM | C” lens, but for some unexplained reasons it is tagged in the photos I take as '150-600mm F5-6.3 DG OS HSM | Contemporary 015".
Software like Darktable will report it as “unsupported”.
I tried many things, but in the end I simply edited the lensfun xml and replaced the original name with the new one. I need to do it every time lensfun is updated on my pc.

You are aware of User's portal · darktable-org/darktable Wiki · GitHub ?

1 Like

Thank you All for your help. I have carefully read the posts and my assumption is that there is probably no SIGMA Art 14-24mm F2.8 DG HSM NIKON on the lensfun list. I can only find on the page Lensfun 14-24mm F2.8 DG DN | Art 019 lens. I assume 019 means it is for Sony mount - this is what I presume after web search.
So the only way would be to follow @dtrtuser advice and make the calibration on my own - which could be beyond me I’m afraid :frowning:
@dtrtuser your help would be much more than appreciated in that case…
And as far as I understood finaly I could edit the lensfun xml file and add my new lens by updating slr-sigma.xml file. This I think I could do with my basic knowledge.
Correct me if I’m wrong please - many TIA.

have a look at Create your own lens correction data for Lensfun – Kameratrollet
he also provides a linux virtual machine for download so you don’t need to install all those fancy tools yourself…

1 Like

@kryspin : if you can provide the raw images (shot as per the instructions), I can try to run them thru the scripts and give you back the xml for your lens.

@dtrtuser many thanks for your help, I will try to take them and will send link.
Regards!