diff --git a/codebase/apps/radar/src/HcrShortLongCombine/HcrShortLongCombine.cc b/codebase/apps/radar/src/HcrShortLongCombine/HcrShortLongCombine.cc index 539075b03..534f991c2 100644 --- a/codebase/apps/radar/src/HcrShortLongCombine/HcrShortLongCombine.cc +++ b/codebase/apps/radar/src/HcrShortLongCombine/HcrShortLongCombine.cc @@ -787,16 +787,16 @@ int HcrShortLongCombine::_readNextDwell() for (size_t ii = 0; ii < _dwellRaysShort.size(); ii++) { RadxRay *ray = _dwellRaysShort[ii]; - RadxField *velCorr = ray->getField(_params.input_vel_corr_field_name); + RadxField *velCorr = ray->getField(_params.input_vel_corr_field_name_short); if (velCorr != NULL) { - ray->removeField(_params.input_vel_corr_field_name); + ray->removeField(_params.input_vel_corr_field_name_short); } } for (size_t ii = 0; ii < _dwellRaysLong.size(); ii++) { RadxRay *ray = _dwellRaysLong[ii]; - RadxField *velCorr = ray->getField(_params.input_vel_corr_field_name); + RadxField *velCorr = ray->getField(_params.input_vel_corr_field_name_long); if (velCorr != NULL) { - ray->removeField(_params.input_vel_corr_field_name); + ray->removeField(_params.input_vel_corr_field_name_long); } } @@ -932,20 +932,20 @@ RadxRay *HcrShortLongCombine::_combineDwellRays() // rename short fields - vector fieldsShort = rayCombined->getFields(); - for (size_t ifield = 0; ifield < fieldsShort.size(); ifield++) { - RadxField *fld = fieldsShort[ifield]; - string newName = fld->getName() + _params.suffix_to_add_for_short_pulse_fields; - fld->setName(newName); - } + // vector fieldsShort = rayCombined->getFields(); + // for (size_t ifield = 0; ifield < fieldsShort.size(); ifield++) { + // RadxField *fld = fieldsShort[ifield]; + // string newName = fld->getName() + _params.suffix_to_add_for_short_pulse_fields; + // fld->setName(newName); + // } // add long fields to short ray vector fieldsLong = rayLong->getFields(); for (size_t ifield = 0; ifield < fieldsLong.size(); ifield++) { RadxField *fld = new RadxField(*fieldsLong[ifield]); - string newName = fld->getName() + _params.suffix_to_add_for_long_pulse_fields; - fld->setName(newName); + // string newName = fld->getName() + _params.suffix_to_add_for_long_pulse_fields; + // fld->setName(newName); rayCombined->addField(fld); } delete rayLong; @@ -1003,11 +1003,11 @@ void HcrShortLongCombine::_unfoldVel(RadxRay *rayCombined) { - string velRawShortName = _params.input_vel_raw_field_name; - velRawShortName += _params.suffix_to_add_for_short_pulse_fields; - string velRawLongName = _params.input_vel_raw_field_name; - velRawLongName += _params.suffix_to_add_for_long_pulse_fields; - + string velRawShortName = _params.input_vel_raw_field_name_short; + // velRawShortName += _params.suffix_to_add_for_short_pulse_fields; + string velRawLongName = _params.input_vel_raw_field_name_long; + // velRawLongName += _params.suffix_to_add_for_long_pulse_fields; + RadxField *velShort = rayCombined->getField(velRawShortName); RadxField *velLong = rayCombined->getField(velRawLongName); @@ -1079,10 +1079,10 @@ void HcrShortLongCombine::_unfoldVel(RadxRay *rayCombined) // rename vel fields - string velCorrShortName = _params.output_vel_corr_field_name; - velCorrShortName += _params.suffix_to_add_for_short_pulse_fields; - string velCorrLongName = _params.output_vel_corr_field_name; - velCorrLongName += _params.suffix_to_add_for_long_pulse_fields; + string velCorrShortName = _params.output_vel_corr_field_name_short; + // velCorrShortName += _params.suffix_to_add_for_short_pulse_fields; + string velCorrLongName = _params.output_vel_corr_field_name_long; + // velCorrLongName += _params.suffix_to_add_for_long_pulse_fields; velShort->setName(velCorrShortName); velLong->setName(velCorrLongName); diff --git a/codebase/apps/radar/src/HcrShortLongCombine/Params.cc b/codebase/apps/radar/src/HcrShortLongCombine/Params.cc index d5e366e88..15cd5305e 100644 --- a/codebase/apps/radar/src/HcrShortLongCombine/Params.cc +++ b/codebase/apps/radar/src/HcrShortLongCombine/Params.cc @@ -1134,64 +1134,76 @@ tt->single_val.b = pTRUE; tt++; - // Parameter 'input_vel_raw_field_name' + // Parameter 'input_vel_raw_field_name_short' // ctype is 'char*' memset(tt, 0, sizeof(TDRPtable)); tt->ptype = STRING_TYPE; - tt->param_name = tdrpStrDup("input_vel_raw_field_name"); + tt->param_name = tdrpStrDup("input_vel_raw_field_name_short"); tt->descr = tdrpStrDup("This is the name for the raw velocity field in the input data. The raw velocity has not been corrected for platform motion."); tt->help = tdrpStrDup("The field name must be the same for the short- and long-prt rays."); - tt->val_offset = (char *) &input_vel_raw_field_name - &_start_; - tt->single_val.s = tdrpStrDup("VEL_RAW"); + tt->val_offset = (char *) &input_vel_raw_field_name_short - &_start_; + tt->single_val.s = tdrpStrDup("VEL_RAW_short"); tt++; - // Parameter 'input_vel_corr_field_name' + // Parameter 'input_vel_raw_field_name_long' // ctype is 'char*' memset(tt, 0, sizeof(TDRPtable)); tt->ptype = STRING_TYPE; - tt->param_name = tdrpStrDup("input_vel_corr_field_name"); + tt->param_name = tdrpStrDup("input_vel_raw_field_name_long"); + tt->descr = tdrpStrDup("This is the name for the raw velocity field in the input data. The raw velocity has not been corrected for platform motion."); + tt->help = tdrpStrDup("The field name must be the same for the short- and long-prt rays."); + tt->val_offset = (char *) &input_vel_raw_field_name_long - &_start_; + tt->single_val.s = tdrpStrDup("VEL_RAW_long"); + tt++; + + // Parameter 'input_vel_corr_field_name_short' + // ctype is 'char*' + + memset(tt, 0, sizeof(TDRPtable)); + tt->ptype = STRING_TYPE; + tt->param_name = tdrpStrDup("input_vel_corr_field_name_short"); tt->descr = tdrpStrDup("This is the name for the velocity field in the input data, corrected for platform motion."); tt->help = tdrpStrDup("If this field exists in the input data, it is deleted and replaced with the values computed by this application."); - tt->val_offset = (char *) &input_vel_corr_field_name - &_start_; - tt->single_val.s = tdrpStrDup("VEL"); + tt->val_offset = (char *) &input_vel_corr_field_name_short - &_start_; + tt->single_val.s = tdrpStrDup("VEL_short"); tt++; - // Parameter 'suffix_to_add_for_short_pulse_fields' + // Parameter 'input_vel_corr_field_name_long' // ctype is 'char*' memset(tt, 0, sizeof(TDRPtable)); tt->ptype = STRING_TYPE; - tt->param_name = tdrpStrDup("suffix_to_add_for_short_pulse_fields"); - tt->descr = tdrpStrDup("This suffix is added to the input fields for short-prt moments."); - tt->help = tdrpStrDup("For each incoming short-pulse field, we add this suffix to the incoming field name."); - tt->val_offset = (char *) &suffix_to_add_for_short_pulse_fields - &_start_; - tt->single_val.s = tdrpStrDup("_short"); + tt->param_name = tdrpStrDup("input_vel_corr_field_name_long"); + tt->descr = tdrpStrDup("This is the name for the velocity field in the input data, corrected for platform motion."); + tt->help = tdrpStrDup("If this field exists in the input data, it is deleted and replaced with the values computed by this application."); + tt->val_offset = (char *) &input_vel_corr_field_name_long - &_start_; + tt->single_val.s = tdrpStrDup("VEL_long"); tt++; - // Parameter 'suffix_to_add_for_long_pulse_fields' + // Parameter 'output_vel_corr_field_name_short' // ctype is 'char*' memset(tt, 0, sizeof(TDRPtable)); tt->ptype = STRING_TYPE; - tt->param_name = tdrpStrDup("suffix_to_add_for_long_pulse_fields"); - tt->descr = tdrpStrDup("This suffix is added to the input fields for long-prt moments."); - tt->help = tdrpStrDup("For each incoming long-pulse field, we add this suffix to the incoming field name."); - tt->val_offset = (char *) &suffix_to_add_for_long_pulse_fields - &_start_; - tt->single_val.s = tdrpStrDup("_long"); + tt->param_name = tdrpStrDup("output_vel_corr_field_name_short"); + tt->descr = tdrpStrDup("Name for the corrected velocity on output."); + tt->help = tdrpStrDup("The name of the output fields for velocity corrected for platform motion."); + tt->val_offset = (char *) &output_vel_corr_field_name_short - &_start_; + tt->single_val.s = tdrpStrDup("VEL_short"); tt++; - // Parameter 'output_vel_corr_field_name' + // Parameter 'output_vel_corr_field_name_long' // ctype is 'char*' memset(tt, 0, sizeof(TDRPtable)); tt->ptype = STRING_TYPE; - tt->param_name = tdrpStrDup("output_vel_corr_field_name"); + tt->param_name = tdrpStrDup("output_vel_corr_field_name_long"); tt->descr = tdrpStrDup("Name for the corrected velocity on output."); tt->help = tdrpStrDup("The name of the output fields for velocity corrected for platform motion."); - tt->val_offset = (char *) &output_vel_corr_field_name - &_start_; - tt->single_val.s = tdrpStrDup("VEL"); + tt->val_offset = (char *) &output_vel_corr_field_name_long - &_start_; + tt->single_val.s = tdrpStrDup("VEL_long"); tt++; // Parameter 'output_vel_unfolded_field_name' diff --git a/codebase/apps/radar/src/HcrShortLongCombine/Params.hh b/codebase/apps/radar/src/HcrShortLongCombine/Params.hh index c2de2b7ae..dc6f41cab 100644 --- a/codebase/apps/radar/src/HcrShortLongCombine/Params.hh +++ b/codebase/apps/radar/src/HcrShortLongCombine/Params.hh @@ -483,15 +483,17 @@ public: tdrp_bool_t perform_velocity_unfolding; - char* input_vel_raw_field_name; + char* input_vel_raw_field_name_short; - char* input_vel_corr_field_name; + char* input_vel_raw_field_name_long; - char* suffix_to_add_for_short_pulse_fields; + char* input_vel_corr_field_name_short; - char* suffix_to_add_for_long_pulse_fields; + char* input_vel_corr_field_name_long; - char* output_vel_corr_field_name; + char* output_vel_corr_field_name_short; + + char* output_vel_corr_field_name_long; char* output_vel_unfolded_field_name; @@ -514,7 +516,7 @@ private: void _init(); - mutable TDRPtable _table[51]; + mutable TDRPtable _table[52]; const char *_className; diff --git a/codebase/apps/radar/src/HcrShortLongCombine/paramdef.HcrShortLongCombine b/codebase/apps/radar/src/HcrShortLongCombine/paramdef.HcrShortLongCombine index d8b6eb8f5..fbd17da0d 100644 --- a/codebase/apps/radar/src/HcrShortLongCombine/paramdef.HcrShortLongCombine +++ b/codebase/apps/radar/src/HcrShortLongCombine/paramdef.HcrShortLongCombine @@ -297,34 +297,52 @@ paramdef boolean { } perform_velocity_unfolding; paramdef string { - p_default = "VEL_RAW"; + p_default = "VEL_RAW_short"; p_descr = "This is the name for the raw velocity field in the input data. The raw velocity has not been corrected for platform motion."; p_help = "The field name must be the same for the short- and long-prt rays."; -} input_vel_raw_field_name; +} input_vel_raw_field_name_short; paramdef string { - p_default = "VEL"; + p_default = "VEL_RAW_long"; + p_descr = "This is the name for the raw velocity field in the input data. The raw velocity has not been corrected for platform motion."; + p_help = "The field name must be the same for the short- and long-prt rays."; +} input_vel_raw_field_name_long; + +paramdef string { + p_default = "VEL_short"; p_descr = "This is the name for the velocity field in the input data, corrected for platform motion."; p_help = "If this field exists in the input data, it is deleted and replaced with the values computed by this application."; -} input_vel_corr_field_name; +} input_vel_corr_field_name_short; paramdef string { - p_default = "_short"; - p_descr = "This suffix is added to the input fields for short-prt moments."; - p_help = "For each incoming short-pulse field, we add this suffix to the incoming field name."; -} suffix_to_add_for_short_pulse_fields; + p_default = "VEL_long"; + p_descr = "This is the name for the velocity field in the input data, corrected for platform motion."; + p_help = "If this field exists in the input data, it is deleted and replaced with the values computed by this application."; +} input_vel_corr_field_name_long; + +// paramdef string { +// p_default = "_short"; +// p_descr = "This suffix is added to the input fields for short-prt moments."; +// p_help = "For each incoming short-pulse field, we add this suffix to the incoming field name."; +// } suffix_to_add_for_short_pulse_fields; + +// paramdef string { +// p_default = "_long"; +// p_descr = "This suffix is added to the input fields for long-prt moments."; +// p_help = "For each incoming long-pulse field, we add this suffix to the incoming field name."; +// } suffix_to_add_for_long_pulse_fields; paramdef string { - p_default = "_long"; - p_descr = "This suffix is added to the input fields for long-prt moments."; - p_help = "For each incoming long-pulse field, we add this suffix to the incoming field name."; -} suffix_to_add_for_long_pulse_fields; + p_default = "VEL_short"; + p_descr = "Name for the corrected velocity on output."; + p_help = "The name of the output fields for velocity corrected for platform motion."; +} output_vel_corr_field_name_short; paramdef string { - p_default = "VEL"; + p_default = "VEL_long"; p_descr = "Name for the corrected velocity on output."; p_help = "The name of the output fields for velocity corrected for platform motion."; -} output_vel_corr_field_name; +} output_vel_corr_field_name_long; paramdef string { p_default = "VEL_unfold_short"; diff --git a/codebase/apps/radar/src/Ts2Moments/Params.cc b/codebase/apps/radar/src/Ts2Moments/Params.cc index 1fd6908d0..f8b958b9e 100644 --- a/codebase/apps/radar/src/Ts2Moments/Params.cc +++ b/codebase/apps/radar/src/Ts2Moments/Params.cc @@ -1200,7 +1200,7 @@ tt->ptype = STRUCT_TYPE; tt->param_name = tdrpStrDup("moments_params"); tt->descr = tdrpStrDup("Moments algorithm parameters."); - tt->help = tdrpStrDup("Sets the moments algorithm parameters by searching through the list of available options.\n\nSEARCHING FOR CORRECT ENTRY IN LIST: we check 5 possible conditions: (a) scan_mode, (b) prf (pulses per second), (c) antenna rate in degrees/sec, (d) xmit_rcv_mode and (e) scan_name.\nThe specified scan mode is checked against the mode in the incoming data.\nSimilarly for the specified scan name, which is checked against the segment_scan_name in the IWRF time series scan_segment header.\nTo ensure that the data will always be processed, include as the last option a default entry in which none of the checks are performed.\n\nPROCESSING OPTIONS:\n(a) beam_n_samples: number of hits.\n(b) index_the_beams: compute beams indexed on evenly-spaced angles.\n(c) index_resolution: angular resolution of the indexed beams.\n(d) min_antenna_rate_for_indexing (deg/sec): if the antenna rate is less than this value, non-indexed beams will be used.\n(e) window: window to be applied to time series. Note that if the VONHANN or BLACKMAN windows are used, beam_n_samples is automatically adjusted to account for the fact that the window concentrates the power in the central part of the time series. The adjustment corrects beam_n_samples by computing the fraction of the window in which 90% of the power occurs. For the VONHANN window this factor is just below 2.0, and for the BLACKMAN window it is just above 2.0. TUKEY_10 refers to a Tukey window with alpha of 0.1. Similarly TUKEY_20 means alpha is 0.2, etc.\n(f) switching_receiver: DEPRECATED (NO LONGER USED), we assuming a switching receiver for the following modes: DP_ALT_HV_CO_ONLY, DP_ALT_HV_CO_CROSS, DP_SIM_HV_SWITCHED_HV.\n(g) xmit_rcv_mode: mode for xmit and receive for polarization diversity\n(h) apply_clutter_filter: should we apply clutter filtering?\n(i) apply_sz: apply phase decoding? See PHASE DECODING later in this parameter file.\n\nxmit_rcv_mode options:\n SINGLE_POL: single polarization, H channel.\n SINGLE_POL_V: single polarization, V channel.\n DP_ALT_HV_CO_ONLY: Dual pol, alternating transmission, copolar receiver only (e.g. CP2 S-band)\n DP_ALT_HV_CO_CROSS: Dual pol, alternating transmission, co-polar and cross-polar receivers (e.g. SPOL with Mitch Switch and receiver in switching mode, CHILL)\n DP_ALT_HV_FIXED_HV: Dual pol, alternating transmission, fixed H and V receivers (e.g. SPOL with Mitch Switch and receivers in fixed mode)\n DP_SIM_HV_FIXED_HV: Dual pol, simultaneous transmission, fixed H and V receivers (e.g. NEXRAD upgrade, SPOL with T and receivers in fixed mode)\n DP_SIM_HV_SWITCHED_HV: Dual pol, simultaneous transmission, switching H and V receivers (e.g. SPOL with T and receivers in switching mode)\n DP_H_ONLY_FIXED_HV: Dual pol, H transmission, fixed H and V receivers (e.g. CP2 X band)\n DP_V_ONLY_FIXED_HV: Dual pol, V transmission, fixed H and V receivers\n\nchange_vel_sign: Option to change the sign of the velocity field. For some radars, the signal processing is set up in such a way that the velocity sign is incorrect. Set this flag to TRUE to change the sign.\n\nproc_flags: special processing options, not active yet.\n\nbeam_method:\nSPECIFY_N_SAMPLES:\n take the next N samples to form the beam;\nSPECIFY_ANGLE:\n check the scanning angles, use those pulses that traverse the specified angular arc;\nCONSTANT_STEERING_ANGLE:\n process all pulses with a constant azimuth and elevation - this applies to some electronically-steered radars, where the beam is steered to a fixed angle for a while, and then jumps to a different pointing direction. We use all of the pulses with a constant steering angle to form the beam;\nPULSE_WIDTH_CHANGE: create beams (dwells) with with constant pulse width - if the pulse width changes we move to a new dwell. Also, optionally specify the pulse width and ignore pulses that do not match the specified value."); + tt->help = tdrpStrDup("Sets the moments algorithm parameters by searching through the list of available options.\n\nSEARCHING FOR CORRECT ENTRY IN LIST: we check 5 possible conditions: (a) scan_mode, (b) prf (pulses per second), (c) antenna rate in degrees/sec, (d) xmit_rcv_mode and (e) scan_name.\nThe specified scan mode is checked against the mode in the incoming data.\nSimilarly for the specified scan name, which is checked against the segment_scan_name in the IWRF time series scan_segment header.\nTo ensure that the data will always be processed, include as the last option a default entry in which none of the checks are performed.\n\nPROCESSING OPTIONS:\n(a) beam_n_samples: number of hits.\n(b) index_the_beams: compute beams indexed on evenly-spaced angles.\n(c) index_resolution: angular resolution of the indexed beams.\n(d) min_antenna_rate_for_indexing (deg/sec): if the antenna rate is less than this value, non-indexed beams will be used.\n(e) window: window to be applied to time series. Note that if the VONHANN or BLACKMAN windows are used, beam_n_samples is automatically adjusted to account for the fact that the window concentrates the power in the central part of the time series. The adjustment corrects beam_n_samples by computing the fraction of the window in which 90% of the power occurs. For the VONHANN window this factor is just below 2.0, and for the BLACKMAN window it is just above 2.0. TUKEY_10 refers to a Tukey window with alpha of 0.1. Similarly TUKEY_20 means alpha is 0.2, etc.\n(f) switching_receiver: DEPRECATED (NO LONGER USED), we assuming a switching receiver for the following modes: DP_ALT_HV_CO_ONLY, DP_ALT_HV_CO_CROSS, DP_SIM_HV_SWITCHED_HV.\n(g) xmit_rcv_mode: mode for xmit and receive for polarization diversity\n(h) apply_clutter_filter: should we apply clutter filtering?\n(i) apply_sz: apply phase decoding? See PHASE DECODING later in this parameter file.\n\nxmit_rcv_mode options:\n SINGLE_POL: single polarization, H channel.\n SINGLE_POL_V: single polarization, V channel.\n DP_ALT_HV_CO_ONLY: Dual pol, alternating transmission, copolar receiver only (e.g. CP2 S-band)\n DP_ALT_HV_CO_CROSS: Dual pol, alternating transmission, co-polar and cross-polar receivers (e.g. SPOL with Mitch Switch and receiver in switching mode, CHILL)\n DP_ALT_HV_FIXED_HV: Dual pol, alternating transmission, fixed H and V receivers (e.g. SPOL with Mitch Switch and receivers in fixed mode)\n DP_SIM_HV_FIXED_HV: Dual pol, simultaneous transmission, fixed H and V receivers (e.g. NEXRAD upgrade, SPOL with T and receivers in fixed mode)\n DP_SIM_HV_SWITCHED_HV: Dual pol, simultaneous transmission, switching H and V receivers (e.g. SPOL with T and receivers in switching mode)\n DP_H_ONLY_FIXED_HV: Dual pol, H transmission, fixed H and V receivers (e.g. CP2 X band)\n DP_V_ONLY_FIXED_HV: Dual pol, V transmission, fixed H and V receivers\n\nchange_vel_sign: Option to change the sign of the velocity field. For some radars, the signal processing is set up in such a way that the velocity sign is incorrect. Set this flag to TRUE to change the sign.\n\nproc_flags: special processing options, not active yet.\n\nbeam_method:\nBEAM_SPECIFY_N_SAMPLES:\n take the next N samples to form the beam;\nBEANM_SPECIFY_ANGLE:\n check the scanning angles, use those pulses that traverse the specified angular arc;\nBEAM_CONSTANT_STEERING_ANGLE:\n process all pulses with a constant azimuth and elevation - this applies to some electronically-steered radars, where the beam is steered to a fixed angle for a while, and then jumps to a different pointing direction. We use all of the pulses with a constant steering angle to form the beam;\nBEAM_PULSE_WIDTH_CHANGE: create beams (dwells) with with constant pulse width - if the pulse width changes we move to a new dwell. Also, optionally specify the pulse width and ignore pulses that do not match the specified value."); tt->array_offset = (char *) &_moments_params - &_start_; tt->array_n_offset = (char *) &moments_params_n - &_start_; tt->is_array = TRUE;