I've sometimes struggled a bit with this issue of a command line interface to a specific function.  My best solution has been to bail on DRY in favor of being explicit.  What that means is repeating the relevant arguments and defaults in both the function and in the argparse definition.  That way if you look at the function definition when reading the code, it's obvious what's happening, and likewise the command line defaults are obvious.

You then have `main()` call `get_ccd_temps(**var(opt))`, or even call out all the keyword args explicitly if there isn't a one-to-one match between what is in `opt` and what `get_ccd_temps` wants.

One compromise is to define a global `DEFAULTS` dict within the file which is then used in the function prototype and for the argparse defaults.  That takes care of the DRY bit at the expense of extra lines of code and a slight lack of immediacy (cannot just look at the code in visible on the screen to see what the values are).  Personally I think the immediacy issue is a higher priority, and in reality the burden of keeping the two sets of values in sync is minimal.  And in fact in some circumstances that might not even be the best choice, maybe calling the command line should have different defaults than calling the function.