I recently tried to update MAF, and ended up opting to reinstall MAF fresh. Having done so, I can no longer get the metrics I’ve written to run.
This is what seems to be the relevant errors that I’m getting:
Querying database Summary with no constraint for columns ['fieldId', 'expMJD', 'fieldRA', 'fieldDec'].
/home/mike/lsst/stack/miniconda3-4.3.21-10a4fa6/Linux64/sims_maf/2.4.0.sims+1/python/lsst/sims/maf/metricBundles/metricBundleGroup.py:269: UserWarning: One or more of the columns requested from the database was not available. Skipping constraint
' Skipping constraint %s' % constraint)
This seems, to me, like it might be coming from the fieldID column specifically. I’m working with the enigma OpSim, and in there the field is labeled as ‘fieldID’, however in the error message, it’s listed as ‘fieldId’ and my concern is that this may be a case-sensitivity issue. I’m using the Opsimfieldslicer for this run.
I’m not sure what else may be causing this error, as the columns are all present when I view the database independently of running a metric.
Yes, you’ve hit the nail on the head - it’s fieldID vs. fieldId (yes, capitalization matters). The problem is that MAF going forward has to support opsim v3 outputs as well as opsim v4 – at least, until opsim v3 outputs are completely obsolete. Opsimv4 uses ‘fieldId’ instead of ‘fieldID’, and we’re generally swapping the defaults to those values instead.
This should be easy to configure from your code (to specify to use fieldID instead of fieldId). Can you paste in a copy of what you’re doing (or some code which will reproduce the problem)?
I’m guessing that you’re using an OpsimFieldSlicer, and if so, I suspect that all you might have to do is to change how you’re instantiating the opsimFieldSlicer:
slicer = OpsimFieldSlicer(simDataFieldIdColName='fieldID', fieldIdColName='fieldID')
this was indeed using the OpsimFieldSlicer so adding those parameters got this working again for me
I’m still getting a couple warnings, should I worry about this one? I’m not actually making any specifications for the plotting.
/home/mike/lsst/stack/miniconda3-4.3.21-10a4fa6/Linux64/sims_maf/2.4.0.sims+1/python/lsst/sims/maf/plots/spatialPlotters.py:530: MatplotlibDeprecationWarning: The set_axis_bgcolor function was deprecated in version 2.0. Use set_facecolor instead.
That warning is okay to ignore … it’s something we should update in MAF, but I need to check what version of matplotlib the stack is expecting (this is something that’s right on the edge of some people will have one version, others will have another). It’s just how we’re setting the background color in the plot.
We require v2.0 of matplotlib. I have to update the stub package to insist on this.
That’s what comes with the miniconda installed with the master of newinstall.sh, right? (I think we are consistently directing people toward master of newinstall now).
Yes. And I am imminently updating the stub packages to require that that version is available.