Skip to content

Commit

Permalink
Merge pull request #107 from grand-mother/dev_snonis
Browse files Browse the repository at this point in the history
Modification of the rf_chain.py script in accordance with new GP300 parameters
  • Loading branch information
lwpiotr authored Jan 7, 2025
2 parents 4642510 + f6c34ff commit 1c06a90
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
3 changes: 2 additions & 1 deletion data/download_data_grand.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#FILE_MODEL = "grand_model_2207.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/201909/grand_model_2306.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/251637/grand_model_190224.tar.gz"
LINK_MODEL = "https://forge.in2p3.fr/attachments/download/340302/grand_model_141124.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/340302/grand_model_141124.tar.gz"
LINK_MODEL = "https://forge.in2p3.fr/attachments/download/362481/grand_model_20241218.tar.gz"
FILE_MODEL = LINK_MODEL.split("/")[-1]


Expand Down
3 changes: 2 additions & 1 deletion data/download_grand_antenna_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#FILE_MODEL = "grand_model_2207.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/201909/grand_model_2306.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/251637/grand_model_190224.tar.gz"
LINK_MODEL = "https://forge.in2p3.fr/attachments/download/340302/grand_model_141124.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/340302/grand_model_141124.tar.gz"
LINK_MODEL = "https://forge.in2p3.fr/attachments/download/362481/grand_model_20241218.tar.gz"
FILE_MODEL = LINK_MODEL.split("/")[-1]


Expand Down
7 changes: 4 additions & 3 deletions data/download_new_RFchain_grand.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#! /usr/bin/env python3

'''
Created on 19 juil. 2022
Created on 24 DEC. 2024
@author: Jean-Marc Colley, CNRS/IN2P3/LPNHE
@author: SN
'''
import tarfile
Expand All @@ -20,7 +20,8 @@
#FILE_MODEL = "grand_model_2207.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/201909/grand_model_2306.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/251637/grand_model_190224.tar.gz"
LINK_MODEL = "https://forge.in2p3.fr/attachments/download/312643/RFchain_V3.tar.gz"
#LINK_MODEL = "https://forge.in2p3.fr/attachments/download/312643/RFchain_V3.tar.gz"
LINK_MODEL = "https://forge.in2p3.fr/attachments/download/362478/RF_chain_20241218.tar.gz"
FILE_MODEL = LINK_MODEL.split("/")[-1]
# class MyProgressBar():
# def __init__(self):
Expand Down
14 changes: 7 additions & 7 deletions examples/read_modify_RF_chain_elements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "e9efdc03-0134-4c05-a6f3-3ec60ea02a3b",
"metadata": {},
"outputs": [],
Expand All @@ -401,7 +401,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "6426156e-196d-4d2b-93bb-bd0d44ad4d24",
"metadata": {},
"outputs": [],
Expand All @@ -422,7 +422,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "e64d22fb-f93d-4858-9d9c-06d2f30a9611",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -464,7 +464,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"id": "da9c238a-ddf5-46db-a280-6486ed1727bf",
"metadata": {},
"outputs": [],
Expand All @@ -475,7 +475,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"id": "568de170-80af-486e-8806-786fb472ae2d",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -505,7 +505,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 12,
"id": "a9d4ac60-6158-4b7a-b44e-50335b898c4f",
"metadata": {},
"outputs": [],
Expand All @@ -517,7 +517,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 13,
"id": "138e4006-fcf7-406f-ba04-8dd9d8f5b2be",
"metadata": {},
"outputs": [
Expand Down
9 changes: 5 additions & 4 deletions grand/sim/detector/rf_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _set_name_data_file(self, axis):
! 2 Port Network Data from SP1.SP block
"""
axis_dict = {0:"X", 1:"Y", 2:"Z"}
filename = os.path.join("detector", "RFchain_v2", "NewMatchingNetwork"f"{axis_dict[axis]}.s2p")
filename = os.path.join("detector", "RFchain_v2", "MatchingNetwork"f"{axis_dict[axis]}.s2p")

return grand_add_path_data(filename)

Expand Down Expand Up @@ -421,7 +421,7 @@ def _set_name_data_file(self, axis):
Hz S dB R 50.000
"""
axis_dict = {0:"X", 1:"Y", 2:"Z"}
filename = os.path.join("detector", "RFchain_v2", "NewLNA_"f"{axis_dict[axis]}.s2p")
filename = os.path.join("detector", "RFchain_v2", "LNA-"f"{axis_dict[axis]}.s2p")

return grand_add_path_data(filename)

Expand Down Expand Up @@ -705,8 +705,9 @@ def _set_name_data_file(self, axis=0):
"""
assert self.gain in [-5, 0, 5, 20]
logger.info(f"vga gain: {self.gain} dB")
filename = os.path.join("detector", "RFchain_v2", "filter+"f"vga{self.gain}db+filter.s2p")

#filename = os.path.join("detector", "RFchain_v2", "filter+"f"vga{self.gain}db+filter.s2p")
filename = os.path.join("detector", "RFchain_v2", "feb+amfitler+biast.s2p")

return grand_add_path_data(filename)

def compute_for_freqs(self, freqs_mhz):
Expand Down
2 changes: 1 addition & 1 deletion scripts/T1_trigger_offline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/pbs/home/x/xtian/.conda/envs/grandlib2304/bin/python3.9
#!/usr/bin/env python3
import numpy as np
import sys
import grand.dataio.root_trees as rt
Expand Down
Binary file modified scripts/figures/Output_Voltage_VGA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scripts/figures/total_transfer_function_vgagain20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed scripts/tefield_0-0_L0_0000.root
Binary file not shown.

0 comments on commit 1c06a90

Please sign in to comment.