Skip to content

Conversation

@jacobweiler
Copy link

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

@AlanSalcedo AlanSalcedo self-requested a review July 1, 2025 14:45
@AlanSalcedo AlanSalcedo requested review from Machtay and marcomuzio July 1, 2025 19:15
@AlanSalcedo
Copy link
Member

AlanSalcedo commented Jul 1, 2025

@jacobweiler nice work Jacob! I left a few comments and requested reviews from others.

@marcomuzio
Copy link
Contributor

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)

Copy link
Contributor

@marcomuzio marcomuzio left a 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.

@AlanSalcedo
Copy link
Member

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)

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.

@marcomuzio
Copy link
Contributor

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)

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?

@AlanSalcedo
Copy link
Member

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)

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?

@jacobweiler
Copy link
Author

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)

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
Copy link
Contributor

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.

Copy link
Author

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?)

Copy link
Contributor

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:

ReadNoiseFigure(string(getenv("ARA_SIM_DIR"))+"/data/ARA02_noiseFig.txt", settings1);

Copy link
Author

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.

Copy link
Contributor

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
Copy link
Contributor

@marcomuzio marcomuzio left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants