Skip to content

Commit

Permalink
Add Flex100 to the list of available detectors
Browse files Browse the repository at this point in the history
  • Loading branch information
jmunozv committed Jul 3, 2020
1 parent 515a56c commit 8ae4b48
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
9 changes: 7 additions & 2 deletions invisible_cities/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,16 @@ def dbnew():
def dbnext100():
return 'next100'

@pytest.fixture(scope='session')
def dbflex100():
return 'flex100'

@pytest.fixture(scope='session',
params=[db_data('demopp' , 3, 256, 3, 79),
db_data('new' , 12, 1792, 3, 79),
db_data('next100', 60, 3584, 0, 0)],
ids=["demo", "new", "next100"])
db_data('next100', 60, 3584, 0, 0),
db_data('flex100', 60, 3062, 0, 0)],
ids=["demo", "new", "next100", "flex100"])
def db(request):
return request.param

Expand Down
2 changes: 1 addition & 1 deletion invisible_cities/database/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def loadDB(dbname : str):


if __name__ == '__main__':
dbname = ['NEWDB', 'DEMOPPDB', 'NEXT100DB']
dbname = ['NEWDB', 'DEMOPPDB', 'NEXT100DB', 'Flex100DB']
if len(sys.argv) > 1:
dbname = sys.argv[1]
loadDB(dbname)
Expand Down
2 changes: 1 addition & 1 deletion invisible_cities/database/download_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from . import download as db

@mark.parametrize('dbname', 'DEMOPPDB NEWDB NEXT100DB'.split())
@mark.parametrize('dbname', 'DEMOPPDB NEWDB NEXT100DB Flex100DB'.split())
def test_create_table_sqlite(dbname, output_tmpdir):
dbfile = os.path.join(output_tmpdir, 'db.sqlite3')

Expand Down
1 change: 1 addition & 0 deletions invisible_cities/database/load_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class DetDB:
new = os.environ['ICTDIR'] + '/invisible_cities/database/localdb.NEWDB.sqlite3'
demopp = os.environ['ICTDIR'] + '/invisible_cities/database/localdb.DEMOPPDB.sqlite3'
next100 = os.environ['ICTDIR'] + '/invisible_cities/database/localdb.NEXT100DB.sqlite3'
flex100 = os.environ['ICTDIR'] + '/invisible_cities/database/localdb.Flex100DB.sqlite3'

def tmap(*args):
return tuple(map(*args))
Expand Down
5 changes: 5 additions & 0 deletions invisible_cities/database/load_db_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def test_frontend_mapping(db):
""" Check the mapping has the expected shape etc """
if db.detector == "next100":
pytest.skip("NEXT100 not implemented yet")
if db.detector == "flex100":
pytest.skip("Flex100 not implemented yet")

run_number = 6000
fe_mapping, _ = DB.PMTLowFrequencyNoise(db.detector, run_number)
Expand All @@ -164,6 +166,9 @@ def test_pmt_noise_frequencies(db):
are of the expected length """
if db.detector == "next100":
pytest.skip("NEXT100 not implemented yet")
if db.detector == "flex100":
pytest.skip("Flex100 not implemented yet")

run_number = 5000
_, frequencies = DB.PMTLowFrequencyNoise(db.detector, run_number)

Expand Down

0 comments on commit 8ae4b48

Please sign in to comment.