Re: [arts-users] Custom antenna response
Dear Frank, First a warning. 2D antenna patterns in ARTS are implemented in a crude way and result in slow calculations. In addition, hardly used and accordingly not very well tested. Not sure where you need help. I would suggest to start without polarization. You seem to have what is needed. The max response of the antenna pattern, the boresight, should be placed at zenith=0 and azimuth=0. If comparing to lat/lon, zenith=0 should be placed at the equator, so a change in e.g. 0.001 deg in zenith and azimuth give equal changes at some distance. I hope the description of antenna_response is clear enough to understand how to fill the variable/file. Even if your antenna data are normalized, I still recommend to set sensor_norm=1. Otherwise, discretization inside ARTS could have an effect. Set antenna_dlos to [[0]]. The tricky part is to set mblock_dlos_grid. This variable is a bit special. It contains a set of relative deviations from the boresight, as pairs of zenith and azimuth deviations. mblock_dlos_grid descrives the "pattern" of pencil beam calculations done, to estimate the radiance field seen by the antenna. If you look at sensor_responseAntenna, there are two options. I recommend the "interp_response" option. Here you basically define a dza_grid and daa_grid, and put all combinations in mblock_dlos_grid in the order described. When you get this to work and results look OK, then add polarisation. You could be the first one to use 2D antennas with polarisation. So maybe also do this with 1D antenna to verify. I hope this is of help. Don't hesitate to ask if something still is unclear, or you get stuck. Bye, Patrick On 2022-10-17 18:42, Werner, Frank (329D) wrote: Dear ARTS team, After playing around with a 1d Gaussian antenna response (using the workspace variable ‘AntennaConstantGaussian1D’), I now want to set a custom antenna pattern from actual lab measurements. I have vectors for the zenith and azimuth angles, as well as a grid of normalized antenna responses for each Stokes vector element. The normalization follows the ARTS behavior, where the integral of the responses over all angle increments is 1. Can you guys help me out with correctly using that info in ARTS? I briefly looked at creating a workspace variable named ‘antenna_response’ with ‘GriddedField4’, but somehow the format confuses me. Also, I am pretty sure that this is not enough and there probably are more steps I need to take for ARTS to accept that variable as the antenna pattern. Thanks for your help and best wishes, Frank -- Frank Werner Mail Stop 183-701, Jet Propulsion Laboratory 4800 Oak Grove Drive, Pasadena, California 91109, United States Phone: +1 818 354-1918
Re: [arts-users] Custom antenna response
Hi Frank, I'm not familiar with how the antenna works exactly, but I'll try to get you started on how to modify or create a GriddedField. A GriddedField consists of the data and the corresponding grids. In the case of the antenna_response these are: print(ws.antenna_response.value.gridnames) [Polarisation, Frequency, Zenith angle, Azimuth angle] Since you already use AntennaConstantGaussian1D, the easiest way to inject your own data is probably to modify the existing antenna_response: ws.AntennaConstantGaussian1D(n_za_grid=1, fwhm=1.5) ws.antenna_response.value.data = np.array( 0.00260905], [0.00350429], [0.00465987], [0.00613486], [0.00799636], [0.010319], [0.01318377], [0.01667627], [0.02088407], [0.02589336], [0.03178475], [0.03862836], [0.04647835], [0.05536716], [0.06529965], [0.07624766], [0.08814531], [0.10088555], [0.1143183], [0.12825067], [0.14244938], [0.15664572], [0.17054287], [0.18382546], [0.19617099], [0.20726262], [0.21680248], [0.22452492], [0.23020879], [0.23368795], [0.23485932], [0.23368795], [0.23020879], [0.22452492], [0.21680248], [0.20726262], [0.19617099], [0.18382546], [0.17054287], [0.15664572], [0.14244938], [0.12825067], [0.1143183], [0.10088555], [0.08814531], [0.07624766], [0.06529965], [0.05536716], [0.04647835], [0.03862836], [0.03178475], [0.02589336], [0.02088407], [0.01667627], [0.01318377], [0.010319], [0.00799636], [0.00613486], [0.00465987], [0.00350429], [0.00260905) Grids can be modified like this: ws.antenna_response.value.set_grid(ws.antenna_response.value.gridnames.index( "Zenith angle"), np.linspace(-2, 2, 61)) After changing the grids or the data, make sure to run a consistency check between data and grids: ws.antenna_response.value.checksize_strict() To create your own GriddedField4 from scratch, this is what the constructor call would look like: ws.antenna_response = pyarts.arts.GriddedField4( gridnames=["Polarisation", "Frequency", "Zenith angle", "Azimuth angle"], grids=[ ["NaN"], # Polarisation grid [-999.], # Frequency grid np.linspace(-1.91097, 1.91097, 61), # Zenith angle grid [0.] # Azimuth angle grid ], data=np.array( 0.00260905], [0.00350429], [0.00465987], [0.00613486], [0.00799636], [0.010319], [0.01318377], [0.01667627], [0.02088407], [0.02589336], [0.03178475], [0.03862836], [0.04647835], [0.05536716], [0.06529965], [0.07624766], [0.08814531], [0.10088555], [0.1143183], [0.12825067], [0.14244938], [0.15664572], [0.17054287], [0.18382546], [0.19617099], [0.20726262], [0.21680248], [0.22452492], [0.23020879], [0.23368795], [0.23485932], [0.23368795], [0.23020879], [0.22452492], [0.21680248], [0.20726262], [0.19617099], [0.18382546], [0.17054287], [0.15664572], [0.14244938], [0.12825067], [0.1143183], [0.10088555], [0.08814531], [0.07624766], [0.06529965], [0.05536716], [0.04647835], [0.03862836], [0.03178475], [0.02589336], [0.02088407], [0.01667627], [0.01318377], [0.010319], [0.00799636], [0.00613486], [0.00465987], [0.00350429], [0.00260905) ) ws.antenna_response.value.checksize_strict() Hope this helps. Cheers, Oliver > On 17 Oct 2022, at 19:06, Werner, Frank (329D) > wrote: > > … just as an update: > > I also tried manually creating a simple 1d pattern with the > ‘sensor_responseAntenna’ workspace method: > > ws.sensor_responseAntenna(ws.sensor_response, > ws.sensor_response_f, > ws.sensor_response_pol, > ws.sensor_response_dlos, > ws.sensor_response_dlos_grid, > [11875000], > [1], > 3, > 1, > [[0.]], > > np.array(0.00260905],[0.00350429],[0.00465987],[0.00613486],[0.00799636], > [0.010319 > ],[0.01318377],[0.01667627],[0.02088407],[0.02589336], > > [0.03178475],[0.03862836],[0.04647835],[0.05536716],[0.06529965], > > [0.07624766],[0.08814531],[0.10088555],[0.1143183 ],[0.12825067], > > [0.14244938],[0.15664572],[0.17054287],[0.18382546],[0.19617099], > > [0.20726262],[0.21680248],[0.22452492],[0.23020879],[0.23368795], > > [0.23485932],[0.23368795],[0.23020879],[0.22452492],[0.21680248], > >
Re: [arts-users] Custom antenna response
… just as an update: I also tried manually creating a simple 1d pattern with the ‘sensor_responseAntenna’ workspace method: ws.sensor_responseAntenna(ws.sensor_response, ws.sensor_response_f, ws.sensor_response_pol, ws.sensor_response_dlos, ws.sensor_response_dlos_grid, [11875000], [1], 3, 1, [[0.]], np.array(0.00260905],[0.00350429],[0.00465987],[0.00613486],[0.00799636], [0.010319 ],[0.01318377],[0.01667627],[0.02088407],[0.02589336], [0.03178475],[0.03862836],[0.04647835],[0.05536716],[0.06529965], [0.07624766],[0.08814531],[0.10088555],[0.1143183 ],[0.12825067], [0.14244938],[0.15664572],[0.17054287],[0.18382546],[0.19617099], [0.20726262],[0.21680248],[0.22452492],[0.23020879],[0.23368795], [0.23485932],[0.23368795],[0.23020879],[0.22452492],[0.21680248], [0.20726262],[0.19617099],[0.18382546],[0.17054287],[0.15664572], [0.14244938],[0.12825067],[0.1143183 ],[0.10088555],[0.08814531], [0.07624766],[0.06529965],[0.05536716],[0.04647835],[0.03862836], [0.03178475],[0.02589336],[0.02088407],[0.01667627],[0.01318377], [0.010319 ],[0.00799636],[0.00613486],[0.00465987],[0.00350429], [0.00260905, 0) ws.sensor_responseInit() But here, I get the error message ‘TypeError: Cannot interpret '0' as a data type’… Again, thanks for your help. Best wishes, Frank -- Frank Werner Mail Stop 183-701, Jet Propulsion Laboratory 4800 Oak Grove Drive, Pasadena, California 91109, United States Phone: +1 818 354-1918 From: "Werner, Frank (329D)" Date: Monday, October 17, 2022 at 9:42 AM To: "arts_users.mi@lists.uni-hamburg.de" Subject: Custom antenna response Dear ARTS team, After playing around with a 1d Gaussian antenna response (using the workspace variable ‘AntennaConstantGaussian1D’), I now want to set a custom antenna pattern from actual lab measurements. I have vectors for the zenith and azimuth angles, as well as a grid of normalized antenna responses for each Stokes vector element. The normalization follows the ARTS behavior, where the integral of the responses over all angle increments is 1. Can you guys help me out with correctly using that info in ARTS? I briefly looked at creating a workspace variable named ‘antenna_response’ with ‘GriddedField4’, but somehow the format confuses me. Also, I am pretty sure that this is not enough and there probably are more steps I need to take for ARTS to accept that variable as the antenna pattern. Thanks for your help and best wishes, Frank -- Frank Werner Mail Stop 183-701, Jet Propulsion Laboratory 4800 Oak Grove Drive, Pasadena, California 91109, United States Phone: +1 818 354-1918
[arts-users] Custom antenna response
Dear ARTS team, After playing around with a 1d Gaussian antenna response (using the workspace variable ‘AntennaConstantGaussian1D’), I now want to set a custom antenna pattern from actual lab measurements. I have vectors for the zenith and azimuth angles, as well as a grid of normalized antenna responses for each Stokes vector element. The normalization follows the ARTS behavior, where the integral of the responses over all angle increments is 1. Can you guys help me out with correctly using that info in ARTS? I briefly looked at creating a workspace variable named ‘antenna_response’ with ‘GriddedField4’, but somehow the format confuses me. Also, I am pretty sure that this is not enough and there probably are more steps I need to take for ARTS to accept that variable as the antenna pattern. Thanks for your help and best wishes, Frank -- Frank Werner Mail Stop 183-701, Jet Propulsion Laboratory 4800 Oak Grove Drive, Pasadena, California 91109, United States Phone: +1 818 354-1918