Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Change Default Mapping to be for V3 Electronics & Use DB Tools #187

Open
1 of 2 tasks
bdorney opened this issue Mar 7, 2019 · 0 comments
Open
1 of 2 tasks

Change Default Mapping to be for V3 Electronics & Use DB Tools #187

bdorney opened this issue Mar 7, 2019 · 0 comments

Comments

@bdorney
Copy link
Contributor

bdorney commented Mar 7, 2019

Brief summary of issue

The channel to strip mapping is not presently correct for v3 electronics, and in many cases it's hard coded to v2b mapping.

Types of issue

  • Bug report (report an issue with the code)
  • Feature request (request for change which adds functionality)

Expected Behavior

The channel-to-strip mapping should stop defaulting to the v2b mapping but should be determined in the following way:

  1. If the user provides an external mapping file the script should use this mapping file (with the option --extChanMapping ),
    • Scripts below should all have the option --extChanMapping.
  2. If an external mapping file is not provided, a DB query based on the chamber name should be determined to load the mapping, or
  3. If the chamber name is not know, the GEBType should be used to query the DB to determine the channel mapping,
  4. If the DB query fails, it should default to the HV3b_V3 mapping included in the repo:

To accomplish this I would propose the getMapping(...) function is adapted to use the db interface tools to determine the mapping.

This may require adding a function to extract the channel mapping from the DB and then getMapping(...) to use this function.

Current Behavior

anaSBitReadout.py

Here the mapping is v3 defaulted. But it is hard coded for HV3b_V1, V2, or V4 hybrids:

if mapping is None:
mapping = mappath+size+"ChannelMap_VFAT3-HV3b-V1_V2_V4.txt"
elif not os.path.isfile(mapping):
raise IOError("No such file or directory", mapping)
else:
pass

anaUltraScurve.py

Here an external mapping file can be provided but otherwise it will default to the v2b mapping:

if options.extChanMapping is not None:
dict_vfatChanLUT = getMapping(options.extChanMapping)
elif GEBtype == 'long':
dict_vfatChanLUT = getMapping(MAPPING_PATH+'/longChannelMap.txt')
if GEBtype == 'short':
dict_vfatChanLUT = getMapping(MAPPING_PATH+'/shortChannelMap.txt')

anaUltraThreshold.py

The mapping is defaulting to the v2b mapping:

if GEBtype == 'long':
intext = open(MAPPING_PATH+'/longChannelMap.txt', 'r')
pass
if GEBtype == 'short':
intext = open(MAPPING_PATH+'/shortChannelMap.txt', 'r')
pass

Context (for feature requests)

The channel to strip mapping is not presented correctly for v3 detectors.

Your Environment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants