#! /usr/bin/env python # # DATABASE OF FirstLight SIMULATIONS # # by Daniel Ceverino, Heidelberg, September 2017 # # make queries to the database import json # import database: ff=open('FirstLight_database.dat', 'r') database = json.load(ff) ff.close() dict(database) print '------------------------------------------------------------' print 'WELCOME TO THE DATABASE OF THE FIRSTLIGHT PROJECT' print '------------------------------------------------------------' print 'maintained by Daniel Ceverino, Heidelberg, September 2017' print ' ' print 'Available runs:' print ' ' print 'DR1:' print '633, 634, 635, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 653, 655, 656, 657, 658, 659, 660, 661, 662, 664, 665, 666, 667, 668, 669, 670, 671, 673, 675, 676, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 739, 740, 744, 745, 746, 747, 748, 750, 752, 753, 754, 755, 756, 757, 758, 760, 761, 763, 767, 768, 769, 770, 771, 772, 773, 774, 775, 777, 778, 779, 780, 781, 782, 783, 784, 788, 789, 792, 793, 794, 796, 800, 801, 802, 803, 805, 806, 808, 809, 810, 811, 814, 815, 816, 818, 819, 823, 824, 825, 826, 827, 829' print ' ' print 'DR2' print '652, 654, 699, 738, 741, 742, 749, 762, 764, 766, 776, 785, 786, 787, 790, 795, 797, 798, 799, 804, 807, 812, 813, 817, 820, 822, 828, 839, 850, 855, 862, 870, 874, 879, 882, 891, 896, 898, 903, 904, 906, 915, 916, 917, 918, 919, 921, 922, 923, 924, 925, 926, 928, 930, 932, 934, 935' print ' ' print 'DR3' print '765, 835, 836, 841, 843, 844, 845, 846, 847, 848, 849, 851, 856, 857, 858, 859, 860, 861, 865, 866, 867, 868, 871, 877, 881, 884, 885, 887, 888, 893, 895, 897, 899, 900, 901, 907, 908, 909, 911, 912, 837, 838, 840, 852, 853, 863, 864, 869, 872, 873, 883, 890, 894, 902, 834, 854, 876, 913, 927, 931, 933, 938, 939, 940, 942, 943, 946, 947, 914, 920, 929, 936, 937, 941, 944' print ' ' print 'Available fields:' print 'run','a','x','y','z', 'Rvir' , 'Mvir' , 'Ms', 'SFR', 'Mgas' print ' ' print "How many queries are you going to submit? " n=int(raw_input()) i=0 print "type keywords (FL700_0.160_Mvir for example): " while i