@@ -171,14 +171,14 @@ class HeatingEvent:
171171
172172 Parameters
173173 ----------
174- rise_start : `~astropy.units.Quantity`
174+ start : `~astropy.units.Quantity`
175175 Time at which the heating event starts
176- rise_end : `~astropy.units.Quantity`
177- Time at which the rise phase stops (and the constant phase starts)
178- decay_start : `~astropy.units.Quantity`
179- Time at which the decay phase starts (and the constant phase stops)
176+ duration : `~astropy.units.Quantity`
177+ Total duration of the heating event
178+ duration_rise : `~astropy.units.Quantity`
179+ Duration of the linear rise phase of the event
180180 decay_end: `~astropy.units.Quantity`
181- Time at which the decay phase and the event ends
181+ Duration of the linear decay phase of the event
182182 rate: `~astropy.units.Quantity`
183183 The maximum heating rate of the event
184184
@@ -189,11 +189,12 @@ class HeatingEvent:
189189 """
190190
191191 @u .quantity_input
192- def __init__ (self , rise_start : u .s , rise_end : u .s , decay_start : u .s , decay_end : u .s , rate : u .Unit ('erg cm-3 s-1' )):
193- self .rise_start = rise_start
194- self .rise_end = rise_end
195- self .decay_start = decay_start
196- self .decay_end = decay_end
192+ def __init__ (self , start : u .s , duration : u .s , duration_rise : u .s , duration_decay : u .s , rate : u .Unit ('erg cm-3 s-1' )):
193+ self .rise_start = start
194+ self .rise_end = self .rise_start + duration_rise
195+ duration_constant = duration - duration_rise - duration_decay
196+ self .decay_start = self .rise_end + duration_constant
197+ self .decay_end = self .decay_start + duration_decay
197198 self .rate = rate
198199
199200 def to_dict (self ):
@@ -213,20 +214,20 @@ class TriangularHeatingEvent(HeatingEvent):
213214
214215 Parameters
215216 ----------
216- rise_start : `~astropy.units.Quantity`
217+ start : `~astropy.units.Quantity`
217218 Time at which the heating event starts
218219 duration: `~astropy.units.Quantity`
219220 Total duration of the event
220221 rate: `~astropy.units.Quantity`
221222 The maximum heating rate of the event
222223 """
223224
224- def __init__ (self , rise_start , duration , rate ):
225+ def __init__ (self , start , duration , rate ):
225226 super ().__init__ (
226- rise_start ,
227- rise_start + duration / 2 ,
228- rise_start + duration / 2 ,
229- rise_start + duration ,
227+ start ,
228+ duration ,
229+ duration / 2 ,
230+ duration / 2 ,
230231 rate ,
231232 )
232233
@@ -237,20 +238,20 @@ class SquareHeatingEvent(HeatingEvent):
237238
238239 Parameters
239240 ----------
240- rise_start : `~astropy.units.Quantity`
241+ start : `~astropy.units.Quantity`
241242 Time at which the heating event starts
242243 duration: `~astropy.units.Quantity`
243244 Total duration of the event
244245 rate: `~astropy.units.Quantity`
245246 The maximum heating rate of the event
246247 """
247248
248- def __init__ (self , rise_start , duration , rate ):
249+ def __init__ (self , start , duration , rate ):
249250 super ().__init__ (
250- rise_start ,
251- rise_start ,
252- rise_start + duration ,
253- rise_start + duration ,
251+ start ,
252+ duration ,
253+ 0 * u . s ,
254+ 0 * u . s ,
254255 rate ,
255256 )
256257
0 commit comments