def _createGsshaPyObjects(self, eventChunk):
        """
        Create GSSHAPY PrecipEvent, PrecipValue, and PrecipGage Objects Method
        """
        ## TODO: Add Support for RADAR file format type values

        # Create GSSHAPY PrecipEvent
        event = PrecipEvent(description=eventChunk['description'],
                            nrGag=eventChunk['nrgag'],
                            nrPds=eventChunk['nrpds'])

        # Associate PrecipEvent with PrecipFile
        event.precipFile = self

        gages = []
        for coord in eventChunk['coords']:
            # Create GSSHAPY PrecipGage object
            gage = PrecipGage(description=coord['description'],
                              x=coord['x'],
                              y=coord['y'])

            # Associate PrecipGage with PrecipEvent
            gage.event = event

            # Append to gages list for association with PrecipValues
            gages.append(gage)

        for valLine in eventChunk['valLines']:
            for index, value in enumerate(valLine['values']):
                # Create GSSHAPY PrecipValue object
                val = PrecipValue(valueType=valLine['type'],
                                  dateTime=valLine['dateTime'],
                                  value=value)

                # Associate PrecipValue with PrecipEvent and PrecipGage
                val.event = event
                val.gage = gages[index]
def _createGsshaPyObjects ( self , eventChunk ) : event = PrecipEvent ( description = eventChunk [ 'description' ] , nrGag = eventChunk [ 'nrgag' ] , nrPds = eventChunk [ 'nrpds' ] ) event . precipFile = self gages = [ ] for coord in eventChunk [ 'coords' ] : gage = PrecipGage ( description = coord [ 'description' ] , x = coord [ 'x' ] , y = coord [ 'y' ] ) gage . event = event gages . append ( gage ) for valLine in eventChunk [ 'valLines' ] : for index , value in enumerate ( valLine [ 'values' ] ) : val = PrecipValue ( valueType = valLine [ 'type' ] , dateTime = valLine [ 'dateTime' ] , value = value ) val . event = event val . gage = gages [ index ]
Create GSSHAPY PrecipEvent, PrecipValue, and PrecipGage Objects Method