FUNCTION dustem_create_synchrotron,key=key,val=val,help=help ;+ ; NAME: ; dustem_create_synchrotron ; PURPOSE: ; DUSTEM pluggin to compute synchrotron emission ; CATEGORY: ; DUSTEM Wrapper ; CALLING SEQUENCE: ; synch=dustem_create_synchrotron([,key=][,val=]) ; INPUTS: ; None ; OPTIONAL INPUT PARAMETERS: ; key = input parameter number ; val = input parameter value ; OUTPUTS: ; synch = synch spectrum (on dustem wavelengths) ; OPTIONAL OUTPUT PARAMETERS: ; None ; ACCEPTED KEY-WORDS: ; help = if set, print this help ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; None ; RESTRICTIONS: ; None ; PROCEDURE: ; This is a dustem pluggin ; EXAMPLES ; ; MODIFICATION HISTORY: ; Written by JPB ;- IF keyword_set(help) THEN BEGIN doc_library,'dustem_create_synchrotron' output=0. goto,the_end ENDIF ;default values of input parameters s=3 ;power spectrum of CR E distribution A=1. ;Synchrotron radiation amplitude at 10 mm IF keyword_set(key) THEN BEGIN a=where(key EQ 1,count1) b=where(key EQ 2,count2) IF count1 NE 0 then s=(val(a))(0) IF count2 NE 0 then A=(val(b))(0) ENDIF IF !dustem_which EQ 'DESERT' THEN BEGIN lambir=((*!dustem_params).gemissiv.lambir) ENDIF ELSE BEGIN lambir=((*!dustem_params).lambda.lambda) ENDELSE cmic=3.e14 nu=cmic/lambir lambir_ref=10000. ;see Deschenes et al 2008, eq 6 synch=nu^(-(s+3.)/2.) norm=interpol(synch,lambir,lambir_ref) synch=synch/norm*A output=synch the_end: RETURN,output END