# How to properly setup astrometry refererence catalog?

**URL:** <https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855>\
**Category:** Support\
**Created:** [April 19, 2018, 8:13am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855 "2018-04-19T08:13:57Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 19, 2018, 8:13am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/1 "2018-04-19T08:13:57Z")

</div>

Hello again,  
After executing `processCcd.py` for image processing, I received an error

```
processCcd FATAL: Failed on dataId={'visit': 806305, 'ccd': 12, 'runId': '05BC19', 'object': 'Abell 2261 POS1', 'date': '2005-08-02', 'filter': 'r', 'state': 'p', 'extension': 13, 'taiObs': '2005-08-02T08:05:44.62', 'expTime': 600.152}: InvalidParameterError: 
  File "src/matchOptimisticB.cc", line 529, in lsst::afw::table::ReferenceMatchVector lsst::meas::astrom::matchOptimisticB(const SimpleCatalog&, const SourceCatalog&, const lsst::meas::astrom::MatchOptimisticBControl&, const lsst::afw::geom::SkyWcs&, int, bool)
    no entries in posRefCat {0}
lsst::pex::exceptions::InvalidParameterError: 'no entries in posRefCat'

```

I think the error comes from the imporper setup of the reference catalog.  
So here is the procedure of the setup (that I tried).  
The package `astrometry_net_data` contains the reference catalog, and the configuration file.

```
/astrometry_net_data$ ls
andConfig.py sdss-dr9-fink-v5b_and_165_0.fits sdss-dr9-fink-v5b_and_165_1.fits sdss-dr9-fink-v5b_and_165_2.fits

```

The codes within the [andConfig.py](http://andConfig.py) is the following

```
filters = ("u","g","r","i","z")
root.magColumnMap = dict([(f,f) for f in filters])
root.magErrorColumnMap = dict([(f, f + '_err') for f in filters])
root.indexFiles = ["sdss-dr9-fink-v5b_and_165_0.fits","sdss-dr9-fink-v5b_and_165_1.fits","sdss-dr9-fink-v5b_and_165_2.fits"]

```

I setup the package `astrometry_net_data` with these commands.

```
$eups declare -m none -r . astrometry_net_data -t version
$setup astrometry_net_data -t version

```

I wonder if this is the correct way to setup a reference catalog?  
I have also checked [Pan-STARRS reference catalog in LSST format](http://www.rubin.community/t/pan-starrs-reference-catalog-in-lsst-format/1572)  
but as a beginner, I don’t quite understand if it helps.  
Thank you

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 19, 2018, 3:38pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/2 "2018-04-19T15:38:35Z")

</div>

When you ask for support, it’s useful if you can include the full information required to reproduce the problem, including:

- What version of the pipeline are you using?
- What data are you processing (I’m guessing CFHT-MegaCam)?
- What command-line are you using?
- What configurations are you changing from their defaults?
- Are there lines in the log from the reference catalog loader? Perhaps you could post the entire contents of the log from running `processCcd.py` on a single CCD?

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 20, 2018, 2:06am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/3 "2018-04-20T02:06:34Z")

</div>

Sorry for not providing the full information.

- Pipeline v15.0 is being used.

- Yes you’re right , I am processing data from CFHT/Megacam instrument .  
To be more specific, the Abell2261 dataset.

- I start processing the data of a single ccd (ccd12) by executing the following command  
` $processCcd.py input --output output --id visit=806305 ccd=12`

- Not too sure about this part. I think I am using the default setting for `processCcd.py`.

- There is no lines in the log from the reference catalog loader. I suspect the problem comes from that because the source of the error “posRefCat” seems to be related to the reference catalog.  
Here is the content after running `process.Ccd.py`

Here is the entire screen log if it will be helpful. log[screen.log](https://www.rubin.community/uploads/short-url/aQGexJ2vE3Cmi1fpmYraXnylqn9.log) (8.9 KB)

Thank you for your help and patience.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 20, 2018, 2:45am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/4 "2018-04-20T02:45:06Z")

</div>

The log lines from the reference loader are:

```auto
processCcd.calibrate.astromRefObjLoader INFO: Loading reference objects using center IcrsCoord(260.8770591, 32.1529617) and radius 0.15128406886197845 deg
processCcd.calibrate.astromRefObjLoader INFO: Loaded 0 reference objects

```

So it seems to be quite happy interrogating the reference catalog, but it’s not getting any objects out.

I’ve checked, and it looks like the default `astromRefObjLoader` is the `LoadAstrometryNetObjectsTask`, so it should be pulling reference sources from the SDSS catalog you’ve `setup`. Is it possible that Abell 2261 isn’t in the SDSS area?

---

<div class="post-metadata">

**Author:** ![rbliu](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/rbliu/32/637_2.png) [@rbliu](https://www.rubin.community/u/rbliu)\
**Post date:** [April 20, 2018, 3:08am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/5 "2018-04-20T03:08:35Z")

</div>

I was also reprocessing some A2261 CFHT data with v13.0 and v14.0 DMstack. Its coordinates I got are (260.61292, 32.13389). And the output from `get-healpix` is

```auto
$ get-healpix -N8 260.61292 32.13389
(RA, DEC) = (260.613, 32.1339) degrees
Healpix=176 in the XY scheme (bighp=2, x=6, y=0)
  healpix=167 in the RING scheme (ringnum=9, longind=23)
  healpix=148 in the NESTED scheme.
Healpix center is (258.75, 35.685335) degrees
Healpix is bounded by RA=[253.125, 264.375], Dec=[30, 41.8103] degrees.
Healpix scale is 26384.5 arcsec.

```

So, if you are using SDSS-dr9, I guess the healpix id should be 176 instead of 165 as shown in your `andConfig.py`.

I did get rid of most ‘no entries in posRefCat’ errors in CFHT data when I switched to Pan-starrs catalogs. So, I think that may also be a solution…

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 22, 2018, 5:41am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/6 "2018-04-22T05:41:51Z")

</div>

Thank you for the reply @price @rbliu !  
The error is gone, and I learnt how to include the correct healpix id in my reference catalog now.

Please allow me to ask one more question.  
I am now trying to apply configuration on `processCcd.py`. By doing so, I execute  
`$ processCcd.py input --output output --id visit=2086871 ccd=12 --configfile processCcdConfig.py`

It seems that it failed to locate my reference catalog file, `astrometry_net_data`.  
I believe some kind of link are missing between the reference catalog and `processCcdConfig.py`,  
but I don’t know how to connect them.

```
Traceback (most recent call last):
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/bin/processCcd.py", line 25, in <module>
    ProcessCcdTask.parseAndRun()
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/cmdLineTask.py", line 586, in parseAndRun
    resultList = taskRunner.run(parsedCmd)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/cmdLineTask.py", line 233, in run
    if self.precall(parsedCmd):
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/cmdLineTask.py", line 347, in precall
    task = self.makeTask(parsedCmd=parsedCmd)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/cmdLineTask.py", line 472, in makeTask
    return self.TaskClass(config=self.config, log=self.log, butler=butler)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/python/lsst/pipe/tasks/processCcd.py", line 161, in __init__
    astromRefObjLoader=astromRefObjLoader, photoRefObjLoader=photoRefObjLoader)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/task.py", line 299, in makeSubtask
    subtask = taskField.apply(name=name, parentTask=self, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pex_config/15.0/python/lsst/pex/config/configurableField.py", line 83, in apply
    return self.target(*args, config=self.value, **kw)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/python/lsst/pipe/tasks/calibrate.py", line 365, in __init__
    self.makeSubtask('astromRefObjLoader', butler=butler)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/task.py", line 299, in makeSubtask
    subtask = taskField.apply(name=name, parentTask=self, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pex_config/15.0/python/lsst/pex/config/configurableField.py", line 83, in apply
    return self.target(*args, config=self.value, **kw)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/meas_algorithms/15.0/python/lsst/meas/algorithms/loadIndexedReferenceObjects.py", line 49, in __init__
    dataset_config = butler.get("ref_cat_config", name=self.config.ref_dataset_name, immediate=True)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/daf_persistence/15.0/python/lsst/daf/persistence/butler.py", line 1410, in get
    raise NoResults("No locations for get:", datasetType, dataId)
lsst.daf.persistence.butlerExceptions.NoResults: No locations for get: datasetType:ref_cat_config dataId:DataId(initialdata={'name': 'astrometry_net_data'}, tag=set())

```

Here is the location of `astrometry_net_data`

```
$ ls
astrometry_net_data input output processCcdConfig.py raw

```

My configuration file contains the following code:

```
from lsst.meas.algorithms import LoadIndexedReferenceObjectsTask

config.calibrate.photoRefObjLoader.retarget(LoadIndexedReferenceObjectsTask)
config.calibrate.photoRefObjLoader.ref_dataset_name = "astrometry_net_data"

config.calibrate.astromRefObjLoader.retarget(LoadIndexedReferenceObjectsTask)
config.calibrate.astromRefObjLoader.ref_dataset_name = "astrometry_net_data"

config.charImage.refObjLoader.retarget(LoadIndexedReferenceObjectsTask)
config.charImage.refObjLoader.ref_dataset_name = "astrometry_net_data"

# Create a filterMap to map between the filters in the refCat and your simulated filters
for refObjLoader in (config.calibrate.astromRefObjLoader,
                     config.calibrate.photoRefObjLoader,
                     config.charImage.refObjLoader):
    refObjLoader.filterMap = {'i3': 'I'}

```

Thank you for helping all along.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 23, 2018, 5:01pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/7 "2018-04-23T17:01:11Z")

</div>

You have configured the use of the LSST-format catalogs (by `retarget`ing to `LoadIndexedReferenceObjectsTask`), but you’re using an astrometry.net-format catalog.

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 24, 2018, 8:02am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/8 "2018-04-24T08:02:00Z")

</div>

Thank you for clarifying.  
If I am using astrometry.net-format catalog, what is the correct way of configuring processCcd.py?

I want to apply the configuration because there is a mismatch of filters between my data (cfht, MegaCam) and the reference catalog. The mismatch causes an error when running processCcd.py

`$processCcd.py input --output output --id visit=2086871 ccd=12`

Here is the error.

```
processCcd FATAL: Failed on dataId={'visit': 2086871, 'ccd': 12, 'runId': '17AT11', 'object': 'Draco Field2', 
'date': '2017-03-23', 'filter': 'i3', 'state': 'p', 'extension': 13, 'taiObs': '2017-03-23T15:05:56.83', 'expTime': 31.155}: RuntimeError: Could not find flux field(s) i3_camFlux, i3_flux

```

The data is using an “i3” filter.  
I tried to edit `colorterms.py` or `processCcd.py` in the obs\_cfht package, but all attempts failed.

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 24, 2018, 1:47pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/9 "2018-04-24T13:47:11Z")

</div>

I believe the [astrometry.net](http://astrometry.net) format is the default, so don’t change any of the loaders. You should be able to keep the `filterMap` configuration change without changing the loaders. If that doesn’t work, look at the output of `processCcd.py input --output output --id visit=2086871 ccd=12 --show config` and see where the `filterMap` change should fit in.

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 25, 2018, 10:58am UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/10 "2018-04-25T10:58:40Z")

</div>

Here is the output after `processCcd.py input --output output --id visit=2086871 ccd=12 --show config` that contains the filtermap configuration, but I don’t understand how to change the configuration (to match with the i3 filter). Do you mind providing some details? Thank you

```
# Mapping of camera filter name: reference catalog filter name; each reference filter must exist
config.calibrate.photoRefObjLoader.filterMap={'i2': 'i'}
# Mapping of camera filter name: reference catalog filter name; each reference filter must exist
config.calibrate.astromRefObjLoader.filterMap={'i2': 'i'}
# Mapping of camera filter name: reference catalog filter name; each reference filter must exist
config.charImage.refObjLoader.filterMap={'i2': 'i'}
```

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 25, 2018, 1:28pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/11 "2018-04-25T13:28:34Z")

</div>

What was wrong with:

> [@jchan](#):
>
> ```
> for refObjLoader in (config.calibrate.astromRefObjLoader,
> config.calibrate.photoRefObjLoader,
> config.charImage.refObjLoader):
> refObjLoader.filterMap = {'i3': 'I'}
> 
> ```

?

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 25, 2018, 1:51pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/12 "2018-04-25T13:51:25Z")

</div>

Sorry for making the confusion.  
That was from the configuration file that I stopped using, so the `processCcd.py` now contains  
{‘i2’: ‘I’} instead of {‘i3’: ‘I’}.

```
import os.path

from lsst.utils import getPackageDir

cfhtConfigDir = os.path.join(getPackageDir("obs_cfht"), "config")
config.calibrate.photoCal.colorterms.load(os.path.join(cfhtConfigDir, 'colorterms.py'))

from lsst.obs.cfht.cfhtIsrTask import CfhtIsrTask
config.isr.retarget(CfhtIsrTask)

config.isr.doBias = False
config.isr.doDark = False
config.isr.doFlat = False
config.isr.doFringe = False
config.isr.fringeAfterFlat = False
config.isr.doWrite = False
config.isr.fringe.filters = ['i', 'i2', 'z']
config.isr.fringe.pedestal = True
config.isr.fringe.small = 1
config.isr.fringe.large = 50
config.isr.doAssembleIsrExposures = True

config.charImage.repair.doCosmicRay = True
config.charImage.repair.cosmicray.cond3_fac = 2.5
config.charImage.repair.cosmicray.cond3_fac2 = 0.4
config.charImage.repair.cosmicray.niteration = 3
config.charImage.repair.cosmicray.nCrPixelMax = 100000
config.charImage.repair.cosmicray.minSigma = 6.0
config.charImage.repair.cosmicray.min_DN = 150.0

# Configuration for AstrometryTask, the default. If the user retargets to
# ANetAstrometryTask, they must update the astrometry.solver.filterMap config
# manually; doing it here is impossible because these overrides are applied
# before any user overrides where retargeting could occur.
for refObjLoader in (config.calibrate.astromRefObjLoader,
                     config.calibrate.photoRefObjLoader,
                     config.charImage.refObjLoader):
    refObjLoader.filterMap = {'i2': 'i'}
config.calibrate.astrometry.wcsFitter.order = 3
config.calibrate.astrometry.matcher.maxMatchDistArcSec = 5

config.calibrate.photoCal.applyColorTerms = True
config.calibrate.photoCal.photoCatName = "e2v"
# this was the default prior to DM-11521. New default is 2000.
config.calibrate.deblend.maxFootprintSize=0

```

The problem still remains, because of the i3 filter from the data.  
Thank you for your patience. I really appreciate your continuous help.

```
processCcd.calibrate.astromRefObjLoader INFO: Loading reference objects using center IcrsCoord(296.0615092, 67.1779176) and radius 0.15131808280803208 deg
processCcd FATAL: Failed on dataId={'visit': 2086871, 'ccd': 12, 'runId': '17AT11', 'object': 'Draco Field2', 'date': '2017-03-23', 'filter': 'i3', 'state': 'p', 'extension': 13, 'taiObs': '2017-03-23T15:05:56.83', 'expTime': 31.155}: RuntimeError: Could not find flux field(s) i3_camFlux, i3_flux
Traceback (most recent call last):
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/cmdLineTask.py", line 408, in __call__
    result = task.run(dataRef, **kwargs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/python/lsst/pipe/tasks/processCcd.py", line 199, in run
    icSourceCat=charRes.sourceCat,
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/python/lsst/pipe/tasks/calibrate.py", line 433, in run
    icSourceCat=icSourceCat,
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/python/lsst/pipe/tasks/calibrate.py", line 523, in calibrate
    sourceCat=sourceCat,
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/meas_astrom/15.0/python/lsst/meas/astrom/astrometry.py", line 188, in run
    res = self.solve(exposure=exposure, sourceCat=sourceCat)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/meas_astrom/15.0/python/lsst/meas/astrom/astrometry.py", line 214, in solve
    calib=expMd.calib,
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/meas_algorithms/15.0/python/lsst/meas/algorithms/loadReferenceObjects.py", line 212, in loadPixelBox
    loadRes = self.loadSkyCircle(circle.coord, circle.radius, filterName)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_base/15.0/python/lsst/pipe/base/timer.py", line 150, in wrapper
    res = func(self, *args, **keyArgs)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/meas_extensions_astrometryNet/15.0/python/lsst/meas/extensions/astrometryNet/loadAstrometryNetObjects.py", line 142, in loadSkyCircle
    fluxField = getRefFluxField(schema=refCat.schema, filterName=filterName)
  File "/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/meas_algorithms/15.0/python/lsst/meas/algorithms/loadReferenceObjects.py", line 66, in getRefFluxField
    raise RuntimeError("Could not find flux field(s) %s" % (", ".join(fluxFieldList)))
RuntimeError: Could not find flux field(s) i3_camFlux, i3_flux
```

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 25, 2018, 2:08pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/13 "2018-04-25T14:08:35Z")

</div>

The data you’re processing requires `i3`, so add it:

```
for refObjLoader in (config.calibrate.astromRefObjLoader,
                     config.calibrate.photoRefObjLoader,
                     config.charImage.refObjLoader):
    refObjLoader.filterMap = {'i2': 'i', 'i3': 'i'}
```

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [April 25, 2018, 2:14pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/14 "2018-04-25T14:14:06Z")

</div>

I have also tried that before, but another error comes out.

`$processCcd.py input --output output --id visit=2086871 ccd=12`

```
root INFO: Loading config overrride file '/home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/obs_cfht/15.0/config/processCcd.py'
CameraMapper INFO: Loading exposure registry from /home/chiba/Research/cfhtTest/input/registry.sqlite3
root INFO: Running: /home/chiba/Research/lsst_stack/stack/miniconda3-4.3.21-10a4fa6/Linux64/pipe_tasks/15.0/bin/processCcd.py input --output output --id visit=2086871 ccd=12
processCcd FATAL: Comparing configuration: Inequality in keys for charImage.refObjLoader.filterMap: {'i3', 'i2'} != {'i2'}
processCcd FATAL: Comparing configuration: Inequality in keys for calibrate.astromRefObjLoader.filterMap: {'i3', 'i2'} != {'i2'}
processCcd FATAL: Comparing configuration: Inequality in keys for calibrate.photoRefObjLoader.filterMap: {'i3', 'i2'} != {'i2'}
processCcd FATAL: Failed in task initialization: Config does not match existing task config 'processCcd_config' on disk; tasks configurations must be consistent within the same output repo (override with --clobber-config)

```

Thank you.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [April 25, 2018, 2:25pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/15 "2018-04-25T14:25:52Z")

</div>

Is the error message not clear about how to remedy this?

---

<div class="post-metadata">

**Author:** ![jchan](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jchan](https://www.rubin.community/u/jchan)\
**Post date:** [May 2, 2018, 12:02pm UTC](https://www.rubin.community/t/how-to-properly-setup-astrometry-refererence-catalog/2855/16 "2018-05-02T12:02:50Z")

</div>

Sorry for not noticing that. I overide it with --clobber-config, and it works now.
