# Reproducible analytical examples; not experimental datasets. import argparse,json,math,sys import numpy as np def line(x,ys,xlabel,ylabel,logx=False,logy=False): return {'kind':'line','x':np.asarray(x).tolist(),'series':[{'label':k,'y':np.asarray(v).tolist()}for k,v in ys.items()],'xlabel':xlabel,'ylabel':ylabel,'logx':logx,'logy':logy} def bar(labels,ys,ylabel): return {'kind':'bar','labels':labels,'series':[{'label':k,'y':np.asarray(v).tolist()}for k,v in ys.items()],'ylabel':ylabel} def scenario(key): d={'analytic':key,'kind':'declared_analytical_or_constructed_example','experimental_model_result':False,'panels':[]} p=d['panels'] if key=='prime-editing-fidelity': other=np.linspace(0,.6,161);n=np.arange(1,1001) p.extend([line(other,{'Intended / changed':.3/(.3+other),'Intended / starting':np.full_like(other,.3)},'Other-outcome fraction of all molecules','Outcome proportion'),line(n,{'Zero-event 95% upper bound':-np.expm1(math.log(.05)/n)},'Independent fully observed molecules','Upper event probability',True,True)]) d.update(title='Conditional purity and starting-population yield are different',assumptions='Constructed intended fraction 0.3; other fraction 0..0.6; no overlap. Independent binomial events with perfect detection for upper bound. No gene editing performed.',worked='1000分子中300预期、100其他改变、600未改变:总体产率30%,改变产物纯度75%。若仅半数起始细胞进入观察,条件预期率30%对应起始15%。零事件n=299时95%上限约0.997%。',checks={'purity':.3/.4,'starting_yield':.5*.3,'zero_upper_299':1-.05**(1/299)}) elif key=='rna-guided-transposition': labels=['Position','Orientation','Intact cargo','No backbone'];v=np.cumprod([.8,.9,.95,.98]);q=np.linspace(0,1,151);ent=[] for x in q: z=np.array([x,*([(1-x)/3]*3)]);ent.append(float(-sum(t*math.log(t)for t in z if t>0))) p.extend([bar(labels,{'Joint qualified fraction':v},'Fraction of starting integrations'),line(q,{'Four-position entropy':ent},'Probability at a declared position','Entropy (natural log units)')]) d.update(title='Joint cargo qualification and positional concentration',assumptions='Conditional pass rates 0.8,0.9,0.95,0.98. Four hypothetical locations; entropy does not label the correct site. No DNA integration measurements.',worked='四条件联合合格率0.8×0.9×0.95×0.98=0.67032。四位置均匀时熵ln4;全部集中在一个位置时为0,即使该位置错误。',checks={'joint_qualified':float(v[-1]),'uniform_entropy':math.log(4)}) elif key=='single-protein-readout': n=np.arange(1,101);cdf=lambda z:.5*np.vectorize(math.erfc)(-z/math.sqrt(2)) ys={f'rho={rho}':(1+(n-1)*rho)/n for rho in [0,.25,.7]} p.extend([line(n,ys,'Rereads of one molecule','Variance of mean; each variance=1',True,True),line(n,{f'rho={rho}':cdf(-1/np.sqrt(v))for (rho,v)in zip([0,.25,.7],ys.values())},'Rereads of one molecule','Two-class Gaussian error',True,True)]) d.update(title='Shared noise creates a floor that rereading cannot remove',assumptions='Equal variance1, equicorrelation0,0.25,0.7. Equal-prior Gaussian classes separated by2. All rereads belong to one constructed molecule, not new protein reads.',worked='n=100、rho=0.25时均值方差0.2575,而非独立假设的0.01;n趋向无穷时方差趋近rho。两类高斯错误只是限定信号模型。',checks={'variance_n100_rho025':.2575,'error_n1':.5*math.erfc(1/math.sqrt(2))}) elif key=='ancient-genome-demography': ratio=np.linspace(.2,5,180);c=np.linspace(0,.3,151) p.extend([line(ratio,{'Observed A proportion':ratio*.3/(ratio*.3+.7),'Historical proportion':np.full_like(ratio,.3)},'A / other sampling probability ratio','Ancestry-group proportion'),line(c,{'Measured allele frequency':(1-c)*.2+c*.8},'Constructed contamination fraction','Allele frequency')]) d.update(title='Unequal sampling and contamination affect different layers',assumptions='Historical A fraction0.3; fixed relative sampling. Ancient allele frequency0.2, contaminant0.8. No ancient genomes, identities or demographic estimates.',worked='A取样机会为其他群体三倍时,样本A比例0.9/(0.9+0.7)=0.5625;污染占20%时构造位点频率由0.2变0.32。',checks={'sample_pi_r3':.5625,'contaminated_c02':.32,'inverse_pi':.5625/(3-2*.5625)}) elif key=='pangenome-reference-bias': ra=np.linspace(.1,1,151);n=np.arange(1,351) p.extend([line(ra,{'Retained alternative fraction':ra/(ra+.9),'True fraction':np.full_like(ra,.5)},'Alternative-read retention; reference=0.9','Observed alternative proportion'),line(n,{f'Variant frequency={f}':(1-f)**(2*n)for f in [.001,.01,.05]},'Independent diploid panel members','Probability variant absent',False,True)]) d.update(title='Allele-dependent retention and finite panel coverage',assumptions='True heterozygosity0.5; reference retention0.9. Independent random haplotypes for panel coverage. No human genomic data or variant calling.',worked='替代等位保留0.5、参考0.9时,观测替代比例0.357143;47独立二倍体未含频率1%变异的概率0.99^94。',checks={'observed_alt':.5/1.4,'absent_f01_N47':.99**94}) elif key=='metagenomic-dark-matter': lam=np.linspace(.01,10,200);m=np.arange(1,31) p.extend([line(lam,{'At least one read':-np.expm1(-lam),'At least two reads':1-np.exp(-lam)*(1+lam)},'Expected independent reads per gene','Detection probability'),line(m,{f'Per-gene recovery={v}':v**m for v in [.8,.9,.98]},'Required pathway genes','All genes observed')]) d.update(title='Detection depth and pathway completeness constrain absence claims',assumptions='Poisson reads; independent equal gene-recovery probabilities. No metagenomes, bins or function assays; real genes can be correlated.',worked='lambda=0.5时零读段概率exp(-0.5)=0.606531。十个组分各独立90%恢复,完整可见概率0.9^10=0.348678。',checks={'no_read_lambda05':math.exp(-.5),'complete_m10_p09':.9**10}) elif key=='ocean-carbon-transport': z=np.linspace(1,20,180);t=np.linspace(0,200,201) p.extend([line(z,{f'Attenuation b={b}':z**(-b)for b in [.4,.8,1.2]},'Depth / reference depth','Flux / reference flux',True,True),line(t,{f'Residence tau={tau}':tau*(-np.expm1(-t/tau))for tau in [10,100]},'Time (constructed units)','Inventory; input flux=1')]) d.update(title='Export, depth transfer and storage time are distinct quantities',assumptions='Power-law reference depth100m, no horizontal flux. Separate one-reservoir models input1, initial0, residence10 or100 arbitrary time units; not ocean estimates.',worked='深度比10时b=0.4,0.8,1.2分别保留0.398107,0.158489,0.063096。单储库t=50时tau=10库存9.93262,tau=100库存39.34693。',checks={'transfer_b08_ratio10':10**(-.8),'stock_t50_tau100':100*(1-math.exp(-.5))}) elif key=='forest-carbon-inference': m=np.arange(1,501) p.extend([line(m,{f'Independent regions J={j}':4/j+100/(j*m)for j in [5,20,100]},'Observations per region m','Variance of regional mean',True,True),bar(['Area weighted','Naive sample'],{'Mean biomass (constructed units)':[200,120]},'Target / sample mean')]) d.update(title='Within-region density cannot remove between-region uncertainty',assumptions='Region variance4, within-region variance100, independent balanced sampling. Two forest types100/300; actual area weights0.5/0.5, sample weights0.9/0.1. No GEDI measurements.',worked='两类森林100、300且面积各半时总体均值200;样本90%来自低值类时朴素均值120。J=20时方差0.2+5/m,增加m无法消除0.2。',checks={'weighted_mean':200.,'naive_mean':120.,'variance_J20_m100':.25}) elif key=='wildfire-compound-risk': joint=np.linspace(0,.2,161) p.extend([line(joint,{'Joint / independent probability':joint/.04},'Joint dry-and-windy probability','Ratio to independent p=0.04'),bar(['Baseline','Area','Biomass','Combustion'],{'Constructed emission index':[1,1.2,1.2*1.1,1.2*1.1*1.05]},'Relative carbon emissions')]) d.update(title='Fixed marginal hazards do not determine joint risk or emissions',assumptions='Both event marginals0.2; joint varies within Frechet bounds0..0.2. Separate emission factors area1.2, biomass1.1, combustion1.05. No real fire forecast or attribution.',worked='边际各20%时独立联合4%;联合16%仍有相同边际,但为独立值4倍。排放三个构造因子相乘1.386。',checks={'joint_independent':.04,'joint_ratio':4.,'emission_product':1.386}) elif key=='pollination-network-resilience': n=np.arange(1,31);v=np.linspace(0,20,180);marg=.2;c=.15;conditional=marg/(1-c) p.extend([line(n,{'Independent availability':1-(1-marg)**n,'Common shock, same marginal':(1-c)*(1-(1-conditional)**n)},'Service providers n','At least one available'),line(v,{f'Saturation K={k}':v/(k+v)for k in [2,10]},'Effective visits (constructed units)','Normalized fruit-set response')]) d.update(title='Shared failure and saturation change the value of redundancy',assumptions='Each provider marginal availability0.2. Common shock0.15, conditional availability0.2/0.85; otherwise independent. Saturation functions hypothetical, not crop measurements.',worked='两条可靠性曲线n=1都为0.2;共同冲击模型上限0.85。相同访问增量在v/(K+v)的不同基线有不同边际收益。',checks={'single_marginal':(1-c)*conditional,'common_limit':1-c,'independent_n3':1-.8**3}) elif key=='tandem-solar-durability': t=np.linspace(0,30,181);j=np.linspace(.5,1.5,160) p.extend([line(t,{'Initial0.33 decay0.02':.33*(-np.expm1(-.02*t))/.02,'Initial0.30 decay0.005':.30*(-np.expm1(-.005*t))/.005},'Service time (years; hypothetical)','Cumulative energy / constant irradiance'),line(j,{'Ideal limiting series current':np.minimum(j,1)},'Top-cell current / fixed bottom current','Normalized series current')]) d.update(title='Initial efficiency and lifetime energy can rank differently',assumptions='Constant unit irradiance, fixed exponential decay rates0.02/0.005 per year, no weather or actual modules. Series min is an ideal constraint, not full device simulation.',worked='25年构造积分:0.33、k=0.02得6.49224;0.30、k=0.005得7.05019。更高初始效率在该假设下累计能量反而低。',checks={'energy_25_fast':.33*(1-math.exp(-.5))/.02,'energy_25_slow':.3*(1-math.exp(-.125))/.005}) elif key=='solid-state-battery-interfaces': f=np.linspace(.1,1,180);n=np.arange(1001) p.extend([line(f,{'Local / nominal current':1/f},'Real contact / nominal area','Local current amplification'),line(n,{f'Fixed retention q={q}':q**n for q in [.999,.9995,.9999]},'Cycles','Remaining inventory fraction')]) d.update(title='Contact geometry and small cumulative losses constrain cells',assumptions='Uniform current only through contact fraction f; constant-q inventory example, not a claim that Coulombic efficiency always equals capacity retention. No battery measurements.',worked='接触比例0.25时局部电流为名义4倍;q=0.9995经1000圈剩0.606455。50微米、1e-3 S/cm的均匀层面积比电阻5 ohm cm2,10mA/cm2压降0.05V。',checks={'amplification_f025':4.,'retention_1000':.9995**1000,'area_resistance':.005/.001,'voltage_drop':.01*.005/.001}) elif key=='co2-electrolysis-systems': fe=np.linspace(.3,1,170);u=np.linspace(.01,1,170);F=96485.33212;M=.028054 p.extend([line(fe,{f'Full-cell voltage={v} V':12*F*v/(fe*M*3.6e6)for v in [2,3,4]},'Ethylene Faradaic efficiency','Electrolysis electricity (kWh/kg)'),line(u,{f'Unreacted recycle r={r}':u/(1-r*(1-u))for r in [0,.5,.95]},'Single-pass conversion u','Ideal total carbon utilization')]) d.update(title='Charge selectivity, cell voltage and carbon recycle are separate',assumptions='Ethylene z=12 electrons/mol, M=0.028054kg/mol. Electricity excludes all separation/auxiliary equipment. Recycling only unreacted feed with fixed conversion and recovery; no catalyst data.',worked=f'全槽3V、FE=0.8时乙烯电解项约{12*F*3/(.8*M*3.6e6):.6f} kWh/kg;u=0.2,r=0.95的理想总利用0.833333。不是全流程能耗或原论文性能。',checks={'energy_V3_FE08':12*F*3/(.8*M*3.6e6),'recycle_u02_r095':.2/(1-.95*.8)}) elif key=='direct-air-capture-balance': y=np.geomspace(1e-6,.1,180);intensity=np.linspace(0,2,161);R=8.314462618;T=298. p.extend([line(y,{'Ideal limiting separation work':R*T*np.log(1/y)/1000},'Feed CO2 mole fraction y','Minimum work (kJ/mol)',True),line(intensity,{'Net removal per tonne captured':1-.5*intensity-1*.1-.05,'Zero net line':np.zeros_like(intensity)},'Electricity carbon intensity (t/MWh)','Net tonnes; storage assumed')]) d.update(title='Dilute separation work and net removal have different boundaries',assumptions='Ideal gas, pure product, infinitesimal recovery; T=298K. Net example electric0.5MWh/t, heat1MWh/t at0.1t/MWh, other0.05t/t; storage assumed, not measured. 400ppm is a declared example.',worked=f'400ppm理想极限约{R*T*math.log(2500)/1000:.6f}kJ/mol;假定电碳强度0.4时每吨捕获净0.65吨。没有实际项目、储存或成本数据。',checks={'ideal_kJ_mol_400ppm':R*T*math.log(2500)/1000,'net_at_I04':.65}) elif key=='enzyme-plastic-circularity': t=np.linspace(0,10,181);ys={} for kd in [.01,.2,1.]:ys[f'Deactivation kd={kd}']=-np.expm1(-(.5/kd)*(-np.expm1(-kd*t))) p.extend([line(t,ys,'Time (constructed units)','Polymer conversion fraction'),bar(['Feed','Depolymerize','Recover','Purify','Repolymerize'],{'Conditional material fraction':[1,.9,.9*.85,.9*.85*.95,.9*.85*.95*.9]},'Fraction of starting material')]) d.update(title='Active-enzyme exposure and downstream recovery both matter',assumptions='First-order enzyme deactivation; initial effective conversion rate0.5, no mass transfer/product inhibition. Conditional yields0.9,0.85,0.95,0.9. No polymer or enzyme experiments.',worked='四阶段联合产率0.9×0.85×0.95×0.9=0.654075;失活模型累计暴露有限,初始速率不能独自决定末点转化。',checks={'closed_loop':.9*.85*.95*.9,'conversion_t2_kd02':1-math.exp(-2.5*(1-math.exp(-.4)))}) elif key=='microbiome-community-causality': a=np.linspace(0,2,181) p.extend([line(a,{'Coexistence equilibrium':1/(1+a),'Stability eigenvalue':(a-1)/(a+1),'Zero eigenvalue':np.zeros_like(a)},'Symmetric interaction a','Normalized state / eigenvalue'),bar(['Before','After'],{'Absolute A':[10,20],'Absolute B':[10,10]},'Constructed absolute abundance')]) d.update(title='Composition and stability are not fixed by a species list',assumptions='Symmetric gLV dx=x(1-x-a*y), dy=y(1-y-a*x). Separate composition example A10->20,B10->10. No cultures, host data or clinical outcomes.',worked='a=0.5时共存x=y=2/3且特征值-1,-1/3;a=1.5时另一特征值0.2而不稳定。B绝对不变时其比例仍从1/2降至1/3。',checks={'equilibrium_a05':2/3,'eig2_a05':-1/3,'eig2_a15':.2,'B_relative_after':1/3}) elif key=='organoid-developmental-variation': m=np.arange(10,2001,10);pi=np.linspace(0,1,161) p.extend([line(m,{f'Donors J={j}, organoids K=3':1/j+.5/(j*3)+4/(j*3*m)for j in [3,6,12]},'Cells per organoid m','Variance of grand mean',True,True),line(pi,{'Bulk mean; cell means1 and3':pi*1+(1-pi)*3},'Fraction of cell type1','Constructed gene mean')]) d.update(title='More cells do not replace independent donors or composition control',assumptions='Independent balanced nested variances donor1,organoid0.5,cell4; K=3. Separate cell-type means fixed1 and3. No cells or biological samples.',worked='J=6,K=3时m趋大方差仍为1/6+0.5/18。第一类比例0.3变0.7,总体表达2.4变1.6,类型内均值不变。',checks={'variance_floor_J6_K3':1/6+.5/18,'bulk_pi03':2.4,'bulk_pi07':1.6}) elif key=='speech-neuroprosthesis': e=np.linspace(0,.5,161);length=np.arange(1,41) p.extend([line(e,{f'Correction cost c={c}s':60/(1+e*c)for c in [1,2,5]},'Correction-event probability per word','Corrected words/min; raw60'),line(length,{f'Independent position error p={p}':(1-p)**length for p in [.05,.1,.2]},'Sentence length (words)','Probability no position error',False,True)]) d.update(title='Raw speed and average error do not determine communication burden',assumptions='Raw60wpm, fixed correction cost, all errors eventually corrected, no pauses. Sentence model uses independent position errors, explicitly NOT measured WER. No neural or participant data.',worked='60原始词/分、纠错事件率0.2且每次2秒,构造有效速度42.8571词/分;独立位置错0.2时20词全对概率0.8^20=0.0115292。',checks={'corrected_v60_e02_c2':60/1.4,'clean_L20_p02':.8**20}) elif key=='gravitational-wave-populations': ratio=np.linspace(.5,3,180);p0=np.linspace(.01,.99,180);v=2**2.5 p.extend([line(ratio,{'Relative detectable volume':ratio**2.5},'Chirp-mass ratio','Ideal Euclidean volume ratio'),line(p0,{'Detected high-mass fraction':v*p0/(v*p0+1-p0),'Underlying fraction':p0},'Underlying high-mass fraction','Population / detected fraction')]) d.update(title='A selected catalogue can have a very different mass mixture',assumptions='Low-redshift Euclidean inspiral-dominated fixed-noise scaling only; no high-mass band effects/cosmology. Two artificial groups with chirp-mass ratio2, not real black-hole populations.',worked=f'啁啾质量比2给理想体积比2^2.5={v:.6f};总体各半时目录重组比例{v/(1+v):.6f}。没有真实事件重分析。',checks={'volume_ratio2':v,'detected_half':v/(1+v),'chirp_10_10':10/2**.2}) elif key=='neutrino-source-attribution': radius=np.linspace(.05,3,181);n=np.arange(1,1001) p.extend([line(radius,{f'Uniform density={density}/deg2':-np.expm1(-density*math.pi*radius**2)for density in [.01,.1,1.]},'Local search radius (degrees)','At least one chance source'),line(n,{'Local p=0.001':-np.expm1(n*math.log1p(-.001))},'Independent identical searches','At least one local exceedance',True)]) d.update(title='Localization and search multiplicity alter chance associations',assumptions='Uniform local Poisson sky patch, planar area pi*r^2 in deg2; independent equal-p searches only. No sky catalogue, detector or discovery significance estimated.',worked='局部p=0.001、100独立试验,全局概率1-0.999^100≈0.0952079。999次可交换背景重排零超越时有限计数p=1/1000,不是0。',checks={'global_p100':1-.999**100,'scramble_floor_B999':1/1000,'chance_density01_r1':1-math.exp(-.1*math.pi)}) else:raise ValueError(key) return d KEYS=['ancient-genome-demography', 'co2-electrolysis-systems', 'direct-air-capture-balance', 'enzyme-plastic-circularity', 'forest-carbon-inference', 'gravitational-wave-populations', 'metagenomic-dark-matter', 'microbiome-community-causality', 'neutrino-source-attribution', 'ocean-carbon-transport', 'organoid-developmental-variation', 'pangenome-reference-bias', 'pollination-network-resilience', 'prime-editing-fidelity', 'rna-guided-transposition', 'single-protein-readout', 'solid-state-battery-interfaces', 'speech-neuroprosthesis', 'tandem-solar-durability', 'wildfire-compound-risk'] if __name__=='__main__': if hasattr(sys.stdout,'reconfigure'):sys.stdout.reconfigure(encoding='utf-8') ap=argparse.ArgumentParser();ap.add_argument('--slug',choices=KEYS);a=ap.parse_args() print(json.dumps(scenario(a.slug)if a.slug else {k:scenario(k)for k in KEYS},ensure_ascii=False,indent=2,allow_nan=False))