nodes: 0, module; 1, function_definition; 2, function_name:set; 3, parameters; 4, block; 5, identifier:self; 6, dictionary_splat_pattern; 7, expression_statement; 8, expression_statement; 9, if_statement; 10, if_statement; 11, if_statement; 12, if_statement; 13, expression_statement; 14, if_statement; 15, if_statement; 16, if_statement; 17, if_statement; 18, if_statement; 19, if_statement; 20, if_statement; 21, if_statement; 22, if_statement; 23, if_statement; 24, if_statement; 25, if_statement; 26, if_statement; 27, if_statement; 28, identifier:kwargs; 29, comment:"""Sets an internal setting for acquistion, using keywords.
  
          Available parameters to set: 
          
          :param acqtime: duration of recording (input) window (seconds)
          :type acqtime: float
          :param aifs: sample rate of the recording (input) operation (Hz)
          :type aifs: int
          :param aochan: AO (generation) channel name
          :type aochan: str
          :param aichan: AI (recording) channel name
          :type aichan: str
          :param nreps: number of repetitions for each unique stimulus
          :type nreps: int
          :param binsz: time bin duration for spike sorting (seconds)
          :type binsz: float
          :param caldb: See :meth:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel.setReferenceVoltage>`
          :type caldb: float
          :param calv: See :meth:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel.setReferenceVoltage>`
          :type calv: float
          :param datafile: a reference to an open file to save data to
          :type datafile: :class:`AcquisitionData<sparkle.data.dataobjects.AcquisitionData>`
          :param average: whether to average repetitions of a trace, saving only the averaged signal
          :type average: bool
          :param reject: whether to reject values higher than a defined threshold. Only used while average is true
          :type reject: bool
          :param rejectrate: the value to base artifact rejection on
          :type rejectrate: float
          """; 30, call; 31, comparison_operator:'acqtime' in kwargs; 32, block; 33, comparison_operator:'aifs' in kwargs; 34, block; 35, boolean_operator; 36, block; 37, comparison_operator:'trigger' in kwargs; 38, block; 39, call; 40, comparison_operator:'aochan' in kwargs; 41, block; 42, comparison_operator:'aichan' in kwargs; 43, block; 44, comparison_operator:'binsz' in kwargs; 45, block; 46, comparison_operator:'save' in kwargs; 47, block; 48, comparison_operator:'caldb' in kwargs; 49, block; 50, comparison_operator:'calv' in kwargs; 51, block; 52, comparison_operator:'calf' in kwargs; 53, block; 54, boolean_operator; 55, block; 56, comparison_operator:'datafile' in kwargs; 57, block; 58, comparison_operator:'reprate' in kwargs; 59, block; 60, comparison_operator:'save' in kwargs; 61, block; 62, comparison_operator:'average' in kwargs; 63, block; 64, comparison_operator:'reject' in kwargs; 65, block; 66, comparison_operator:'rejectrate' in kwargs; 67, block; 68, attribute; 69, argument_list; 70, string; 71, identifier:kwargs; 72, expression_statement; 73, string; 74, identifier:kwargs; 75, expression_statement; 76, expression_statement; 77, comparison_operator:'aifs' in kwargs; 78, comparison_operator:'acqtime' in kwargs; 79, expression_statement; 80, expression_statement; 81, expression_statement; 82, string; 83, identifier:kwargs; 84, expression_statement; 85, attribute; 86, argument_list; 87, string; 88, identifier:kwargs; 89, expression_statement; 90, string; 91, identifier:kwargs; 92, expression_statement; 93, string; 94, identifier:kwargs; 95, expression_statement; 96, string; 97, identifier:kwargs; 98, expression_statement; 99, string; 100, identifier:kwargs; 101, expression_statement; 102, string; 103, identifier:kwargs; 104, expression_statement; 105, string; 106, identifier:kwargs; 107, expression_statement; 108, comparison_operator:'caldb' in kwargs; 109, comparison_operator:'calv' in kwargs; 110, expression_statement; 111, string; 112, identifier:kwargs; 113, expression_statement; 114, string; 115, identifier:kwargs; 116, expression_statement; 117, string; 118, identifier:kwargs; 119, expression_statement; 120, string; 121, identifier:kwargs; 122, expression_statement; 123, string; 124, identifier:kwargs; 125, expression_statement; 126, string; 127, identifier:kwargs; 128, expression_statement; 129, attribute; 130, identifier:acquire; 131, string_content:acqtime; 132, call; 133, string_content:aifs; 134, call; 135, assignment; 136, string; 137, identifier:kwargs; 138, string; 139, identifier:kwargs; 140, assignment; 141, assignment; 142, assignment; 143, string_content:trigger; 144, call; 145, attribute; 146, identifier:release; 147, string_content:aochan; 148, assignment; 149, string_content:aichan; 150, assignment; 151, string_content:binsz; 152, assignment; 153, string_content:save; 154, assignment; 155, string_content:caldb; 156, assignment; 157, string_content:calv; 158, assignment; 159, string_content:calf; 160, assignment; 161, string; 162, identifier:kwargs; 163, string; 164, identifier:kwargs; 165, call; 166, string_content:datafile; 167, assignment; 168, string_content:reprate; 169, assignment; 170, string_content:save; 171, assignment; 172, string_content:average; 173, assignment; 174, string_content:reject; 175, assignment; 176, string_content:rejectrate; 177, assignment; 178, identifier:self; 179, identifier:player_lock; 180, attribute; 181, argument_list; 182, attribute; 183, argument_list; 184, attribute; 185, subscript; 186, string_content:aifs; 187, string_content:acqtime; 188, identifier:t; 189, call; 190, identifier:npoints; 191, binary_operator:t*float(kwargs.get('aifs', self.player.get_aifs())); 192, attribute; 193, call; 194, attribute; 195, argument_list; 196, identifier:self; 197, identifier:player_lock; 198, attribute; 199, subscript; 200, attribute; 201, subscript; 202, attribute; 203, subscript; 204, attribute; 205, subscript; 206, attribute; 207, subscript; 208, attribute; 209, subscript; 210, attribute; 211, subscript; 212, string_content:caldb; 213, string_content:calv; 214, attribute; 215, argument_list; 216, attribute; 217, subscript; 218, attribute; 219, subscript; 220, attribute; 221, subscript; 222, attribute; 223, subscript; 224, attribute; 225, subscript; 226, attribute; 227, subscript; 228, attribute; 229, identifier:set_aidur; 230, subscript; 231, attribute; 232, identifier:set_aifs; 233, subscript; 234, identifier:self; 235, identifier:aifs; 236, identifier:kwargs; 237, string; 238, attribute; 239, argument_list; 240, identifier:t; 241, call; 242, identifier:self; 243, identifier:aitimes; 244, attribute; 245, argument_list; 246, attribute; 247, identifier:set_trigger; 248, subscript; 249, identifier:self; 250, identifier:aochan; 251, identifier:kwargs; 252, string; 253, identifier:self; 254, identifier:aichan; 255, identifier:kwargs; 256, string; 257, identifier:self; 258, identifier:binsz; 259, identifier:kwargs; 260, string; 261, identifier:self; 262, identifier:save_data; 263, identifier:kwargs; 264, string; 265, identifier:self; 266, identifier:caldb; 267, identifier:kwargs; 268, string; 269, identifier:self; 270, identifier:calv; 271, identifier:kwargs; 272, string; 273, identifier:self; 274, identifier:calf; 275, identifier:kwargs; 276, string; 277, identifier:self; 278, identifier:update_reference_voltage; 279, identifier:self; 280, identifier:datafile; 281, identifier:kwargs; 282, string; 283, identifier:self; 284, identifier:reprate; 285, identifier:kwargs; 286, string; 287, identifier:self; 288, identifier:save_data; 289, identifier:kwargs; 290, string; 291, identifier:self; 292, identifier:average; 293, identifier:kwargs; 294, string; 295, identifier:self; 296, identifier:reject; 297, identifier:kwargs; 298, string; 299, identifier:self; 300, identifier:rejectrate; 301, identifier:kwargs; 302, string; 303, identifier:self; 304, identifier:player; 305, identifier:kwargs; 306, string; 307, identifier:self; 308, identifier:player; 309, identifier:kwargs; 310, string; 311, string_content:aifs; 312, identifier:kwargs; 313, identifier:get; 314, string; 315, call; 316, identifier:float; 317, argument_list; 318, identifier:np; 319, identifier:linspace; 320, integer:0; 321, identifier:t; 322, identifier:npoints; 323, identifier:self; 324, identifier:player; 325, identifier:kwargs; 326, string; 327, string_content:aochan; 328, string_content:aichan; 329, string_content:binsz; 330, string_content:save; 331, string_content:caldb; 332, string_content:calv; 333, string_content:calf; 334, string_content:datafile; 335, string_content:reprate; 336, string_content:save; 337, string_content:average; 338, string_content:reject; 339, string_content:rejectrate; 340, string_content:acqtime; 341, string_content:aifs; 342, string_content:acqtime; 343, attribute; 344, argument_list; 345, call; 346, string_content:trigger; 347, attribute; 348, identifier:get_aidur; 349, attribute; 350, argument_list; 351, identifier:self; 352, identifier:player; 353, identifier:kwargs; 354, identifier:get; 355, string; 356, call; 357, string_content:aifs; 358, attribute; 359, argument_list; 360, attribute; 361, identifier:get_aifs; 362, identifier:self; 363, identifier:player
code: def set(self, **kwargs):
          """Sets an internal setting for acquistion, using keywords.
  
          Available parameters to set: 
          
          :param acqtime: duration of recording (input) window (seconds)
          :type acqtime: float
          :param aifs: sample rate of the recording (input) operation (Hz)
          :type aifs: int
          :param aochan: AO (generation) channel name
          :type aochan: str
          :param aichan: AI (recording) channel name
          :type aichan: str
          :param nreps: number of repetitions for each unique stimulus
          :type nreps: int
          :param binsz: time bin duration for spike sorting (seconds)
          :type binsz: float
          :param caldb: See :meth:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel.setReferenceVoltage>`
          :type caldb: float
          :param calv: See :meth:`StimulusModel<sparkle.stim.stimulus_model.StimulusModel.setReferenceVoltage>`
          :type calv: float
          :param datafile: a reference to an open file to save data to
          :type datafile: :class:`AcquisitionData<sparkle.data.dataobjects.AcquisitionData>`
          :param average: whether to average repetitions of a trace, saving only the averaged signal
          :type average: bool
          :param reject: whether to reject values higher than a defined threshold. Only used while average is true
          :type reject: bool
          :param rejectrate: the value to base artifact rejection on
          :type rejectrate: float
          """
          self.player_lock.acquire()
          if 'acqtime' in kwargs:
              self.player.set_aidur(kwargs['acqtime'])
          if 'aifs' in kwargs:
              self.player.set_aifs(kwargs['aifs'])
              self.aifs = kwargs['aifs']
          if 'aifs' in kwargs or 'acqtime' in kwargs:
              t = kwargs.get('acqtime', self.player.get_aidur())
              npoints = t*float(kwargs.get('aifs', self.player.get_aifs()))
              self.aitimes = np.linspace(0, t, npoints)
          if 'trigger' in kwargs:
              self.player.set_trigger(kwargs['trigger'])
          self.player_lock.release()
  
          if 'aochan' in kwargs:
              self.aochan = kwargs['aochan']
          if 'aichan' in kwargs:
              self.aichan = kwargs['aichan']
          if 'binsz' in kwargs:
              self.binsz = kwargs['binsz']
          if 'save' in kwargs:
              self.save_data = kwargs['save']
          if 'caldb' in kwargs:
              self.caldb = kwargs['caldb']
          if 'calv' in kwargs:
              self.calv = kwargs['calv']
          if 'calf' in kwargs:
              self.calf = kwargs['calf']
          if 'caldb' in kwargs or 'calv' in kwargs:
              self.update_reference_voltage()
          if 'datafile' in kwargs:
              self.datafile = kwargs['datafile']
          if 'reprate' in kwargs:
              self.reprate = kwargs['reprate']
          if 'save' in kwargs:
              self.save_data = kwargs['save']
          if 'average' in kwargs:
              self.average = kwargs['average']
          if 'reject' in kwargs:
              self.reject = kwargs['reject']
          if 'rejectrate' in kwargs:
              self.rejectrate = kwargs['rejectrate']