@@ -8,7 +8,10 @@ class JlcPartsBaseFet(JlcPartsBase, BaseTableFet):
88 _JLC_PARTS_FILE_NAMES = ["TransistorsMOSFETs" ]
99 _CHANNEL_MAP = {
1010 'N Channel' : 'N' ,
11+ '1 N-channel' : 'N' ,
12+ '1 N-Channel' : 'N' ,
1113 'P Channel' : 'P' ,
14+ '1 Piece P-Channel' : 'P' ,
1215 }
1316
1417 @classmethod
@@ -39,14 +42,18 @@ def _entry_to_table_row(cls, row_dict: Dict[PartsTableColumn, Any], filename: st
3942 input_capacitance : Optional [float ] = attributes .get ("Input capacitance (ciss@vds)" , float , sub = 'capacity' )
4043 except (KeyError , TypeError ):
4144 input_capacitance = None
45+
4246 try : # not specified for most parts apparently
43- gate_charge = attributes .get ("Total gate charge (qg@vgs)" , float , sub = 'charge' )
47+ gate_charge : Optional [ float ] = attributes .get ("Total gate charge (qg@vgs)" , float , sub = 'charge' )
4448 except (KeyError , TypeError ):
4549 if input_capacitance is not None : # not strictly correct but kind of a guesstimate
4650 gate_charge = input_capacitance * vgs_for_ids
4751 else :
48- gate_charge = 3000e-9 # very pessimistic upper bound
49- row_dict [cls .GATE_CHARGE ] = Range .exact (gate_charge )
52+ gate_charge = None
53+ if gate_charge is not None :
54+ row_dict [cls .GATE_CHARGE ] = Range .exact (gate_charge )
55+ else :
56+ row_dict [cls .GATE_CHARGE ] = Range .all ()
5057
5158 return row_dict
5259 except (KeyError , TypeError , PartParserUtil .ParseError ):
@@ -58,23 +65,7 @@ class JlcPartsFet(PartsTableSelectorFootprint, JlcPartsBaseFet, TableFet):
5865
5966
6067class JlcPartsSwitchFet (PartsTableSelectorFootprint , JlcPartsBaseFet , TableSwitchFet ):
61- @init_in_parent
62- def __init__ (self , * args , manual_gate_charge : RangeLike = RangeExpr .ZERO , ** kwargs ):
63- super ().__init__ (* args , ** kwargs )
64- # allow the user to specify a gate charge
65- self .manual_gate_charge = self .ArgParameter (manual_gate_charge )
66- self .generator_param (self .manual_gate_charge )
67-
68- def _table_postprocess (self , table : PartsTable ) -> PartsTable :
69- manual_gate_charge = self .get (self .manual_gate_charge )
70- def process_row (row : PartsTableRow ) -> Optional [Dict [PartsTableColumn , Any ]]:
71- return {self .GATE_CHARGE : manual_gate_charge }
72-
73- # must run before TableFet power calculations
74- if not manual_gate_charge == Range .exact (0 ):
75- table = table .map_new_columns (process_row , overwrite = True )
76-
77- return super ()._table_postprocess (table )
68+ pass
7869
7970
8071lambda : JlcPartsFet (), JlcPartsSwitchFet () # ensure class is instantiable (non-abstract)
0 commit comments