|
331 | 331 | angle_group.create_dataset('value', data=cosine) |
332 | 332 | angle_group.create_dataset('pdf', data=pdf) |
333 | 333 |
|
334 | | - # Fission: Isotropic (mostly) |
| 334 | + # Fission: Isotropic (should be!?) |
335 | 335 | if fissionable: |
336 | 336 | anisotropic = False |
337 | 337 |
|
|
340 | 340 | idx = rx_block.index(18) |
341 | 341 | if not angle_block.is_fully_isotropic(idx): |
342 | 342 | anisotropic = True |
343 | | - print_note('Anisotropic fission neutron') |
344 | 343 | else: |
345 | 344 | isotropic = [] |
346 | 345 | for MT in fission_components: |
347 | 346 | idx = rx_block.index(MT) |
348 | 347 | isotropic.append(angle_block.is_fully_isotropic(idx)) |
349 | 348 | if not all(isotropic): |
350 | 349 | print_error('Anisotropic fission neutron') |
351 | | - # TODO |
352 | 350 |
|
353 | 351 | if anisotropic: |
354 | | - angle_group = fission_group.create_group('MT-018/emission_cosine') |
355 | | - angle_group.attrs['type'] = 'multi-table' |
356 | | - |
357 | 352 | idx = rx_block.index(18) |
358 | 353 | data = angle_block.angular_distribution_data(idx) |
359 | 354 |
|
|
364 | 359 | if ( |
365 | 360 | data.distribution_type(idx) != ACEtk.AngularDistributionType.Tabulated |
366 | 361 | ): |
367 | | - print_error("Fission angular distribution is not all-tabulated") |
| 362 | + print_error("Anisotropic fission angular distribution is not all-tabulated") |
368 | 363 |
|
369 | | - # Incident energy |
370 | | - energy = np.array(data.incident_energies) * 1E6 # MeV to eV |
371 | | - energy = angle_group.create_dataset('energy', data=energy) |
372 | | - energy.attrs['unit'] = 'eV' |
373 | | - |
374 | | - # Disstributions |
375 | | - interpolation = np.zeros(NE, dtype=int) |
376 | | - offset = np.zeros(NE, dtype=int) |
377 | | - cosine = [] |
378 | | - pdf = [] |
379 | 364 | for i, distribution in enumerate(data.distributions): |
380 | | - interpolation[i] = distribution.interpolation |
381 | | - offset[i] = len(cosine) |
382 | | - cosine.extend(distribution.cosines) |
383 | | - pdf.extend(distribution.pdf) |
| 365 | + pdf = distribution.pdf[:] |
| 366 | + if len(pdf) != 2 or pdf[0] != 0.5 or pdf[1] != 0.5: |
| 367 | + print_error("Anisotropic fission neutron") |
384 | 368 |
|
385 | | - print(data.incident_energies[:]) |
386 | | - print(distribution.cosines[:]) |
387 | | - print(distribution.pdf[:]) |
388 | | - input() |
389 | | - cosine = np.array(cosine) |
390 | | - pdf = np.array(pdf) |
391 | | - angle_group.create_dataset('interpolation', data=interpolation) |
392 | | - angle_group.create_dataset('offset', data=offset) |
393 | | - angle_group.create_dataset('value', data=cosine) |
394 | | - angle_group.create_dataset('pdf', data=pdf) |
| 369 | + print_note("Tabulated isotropic fission neutron distribution") |
395 | 370 |
|
396 | 371 | # Inelastic |
397 | 372 | for MT in inelastic_MTs: |
|
0 commit comments