-
Notifications
You must be signed in to change notification settings - Fork 15
Beam pattern read-in #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Beam pattern read-in #203
Conversation
|
@jacobweiler nice work Jacob! I left a few comments and requested reviews from others. |
|
Sorry just catching up here. So the idea is that we are replacing the custom antenna gain file with a "beam pattern" file? But it's basically just the antenna gain still? (Sorry explain to me like I am 3) |
marcomuzio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me! Just a few small questions and suggestions.
Yeah, I think the idea is to have the custom antenna model be referenced via a gain file path (same file format and type) in the setup file. |
Ah okay that makes sense. I guess I'm wondering a bit about the use case here. Is this for a genetis thing where a lot of different (and short lived) beam patterns are going to be tested? |
Yes, I think so. @jacobweiler is that what you had in mind? |
Yes this is for GENETIS to allow for scripts to input in the filepaths of converted uan files in the loop. There was a way before in AraSim to input in different gain file, but it would be a little messy/dangerous as I'd be writing over a single file quite a bit. I will work through all these changes soontm. Thanks for the comments. |
- Changed language from beampattern to gain_file - Added warning if custom file name set but not in antenna_mode = 6 - Functionalized the parsing of the file paths from the settings file - Formatting changes
- Now to define file path you just need the path in double quotes after an equal sign
Settings.cc
Outdated
|
|
||
| HPOL_GAIN_FILE="./data/antennas/realizedGain/ARA_dipoletest1_output.txt"; // Default to original Ara Data | ||
| VTOP_GAIN_FILE="./data/antennas/realizedGain/ARA_bicone6in_output.txt"; // Default to original Ara Data | ||
| VPOL_GAIN_FILE="./data/antennas/realizedGain/ARA_bicone6in_output.txt"; // Default to original Ara Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So just to make sure, if someone just wants to change one of these, they don't have to pass the path to the others even in this setting right? If so then I think things are good to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It defaults to what gain files are in ANTENNA_MODE == 0 in Detector.cc, though it seems like the path has slightly changed since I wrote this a year ago... so I will go and try to get that in line with current the current method soontm
If it doesn't see any defined path in the setup file, it should just default to those gains. Again, if anyone thinks other gain files are more apt for this let me know and I will change it. I just put the gain files that I'd want default when evolving antennas in GENETIS, but I could have also picked the wrong mode based on older GENETIS setup scripts (ie, maybe antenna_mode=1 is better?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this reminds me that these default file paths should use an environmental variable to avoid issues running outside of the AraSim directory. Here's an example:
Line 871 in 2593a75
| ReadNoiseFigure(string(getenv("ARA_SIM_DIR"))+"/data/ARA02_noiseFig.txt", settings1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be fixed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, yeah that's what I was wondering about when I saw that. Looks good to merge on my end.
- moved to same area as other error checking if statements to have it not accidentally trigger
marcomuzio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those changes! I think this all looks good on my end.
This pull request allows for beam patterns to be read-in from defined paths in the setup file for VPOL, VTOP, and HPOL in ANTENNA_MODE=6.
Example usage:
In a setup file add in the following lines:
ANTENNA_MODE=6 // (DEFAULT=0) Antenna to be used
VPOL_BEAMPATTERN="path/to/beam/pattern" // (DEFAULT=CustomFileinAra)" Filepath to read in any gain pattern from setup file for VPOL
VTOP_BEAMPATTERN="path/to/beam/pattern" // (DEFAULT=CustomFileinAra)
HPOL_BEAMPATTERN="path/to/beam/pattern" // (DEFAULT=CustomFileinAra) Filepath to read in any gain pattern from setup file for HPOL